w32tex
About: TeX Live provides a comprehensive TeX system including all the major TeX-related programs, macro packages, and fonts that are free software. Windows sources.
  Fossies Dox: w32tex-src.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

brotli_bit_stream.c
Go to the documentation of this file.
1 /* Copyright 2014 Google Inc. All Rights Reserved.
2 
3  Distributed under MIT license.
4  See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
5 */
6 
7 /* Brotli bit stream functions to support the low level format. There are no
8  compression algorithms here, just the right ordering of bits to match the
9  specs. */
10 
11 #include "./brotli_bit_stream.h"
12 
13 #include <string.h> /* memcpy, memset */
14 
15 #include "../common/constants.h"
16 #include "../common/context.h"
17 #include "../common/platform.h"
18 #include <brotli/types.h>
19 #include "./entropy_encode.h"
21 #include "./fast_log.h"
22 #include "./histogram.h"
23 #include "./memory.h"
24 #include "./write_bits.h"
25 
26 #if defined(__cplusplus) || defined(c_plusplus)
27 extern "C" {
28 #endif
29 
30 #define MAX_HUFFMAN_TREE_SIZE (2 * BROTLI_NUM_COMMAND_SYMBOLS + 1)
31 /* The maximum size of Huffman dictionary for distances assuming that
32  NPOSTFIX = 0 and NDIRECT = 0. */
33 #define MAX_SIMPLE_DISTANCE_ALPHABET_SIZE \
34  BROTLI_DISTANCE_ALPHABET_SIZE(0, 0, BROTLI_LARGE_MAX_DISTANCE_BITS)
35 /* MAX_SIMPLE_DISTANCE_ALPHABET_SIZE == 140 */
36 
38  uint32_t code = (len >= 177) ? (len >= 753 ? 20 : 14) : (len >= 41 ? 7 : 0);
39  while (code < (BROTLI_NUM_BLOCK_LEN_SYMBOLS - 1) &&
41  return code;
42 }
43 
45  uint32_t* n_extra, uint32_t* extra) {
47  *n_extra = _kBrotliPrefixCodeRanges[*code].nbits;
49 }
50 
51 typedef struct BlockTypeCodeCalculator {
52  size_t last_type;
55 
57  self->last_type = 1;
58  self->second_last_type = 0;
59 }
60 
62  BlockTypeCodeCalculator* calculator, uint8_t type) {
63  size_t type_code = (type == calculator->last_type + 1) ? 1u :
64  (type == calculator->second_last_type) ? 0u : type + 2u;
65  calculator->second_last_type = calculator->last_type;
66  calculator->last_type = type;
67  return type_code;
68 }
69 
70 /* |nibblesbits| represents the 2 bits to encode MNIBBLES (0-3)
71  REQUIRES: length > 0
72  REQUIRES: length <= (1 << 24) */
73 static void BrotliEncodeMlen(size_t length, uint64_t* bits,
74  size_t* numbits, uint64_t* nibblesbits) {
75  size_t lg = (length == 1) ? 1 : Log2FloorNonZero((uint32_t)(length - 1)) + 1;
76  size_t mnibbles = (lg < 16 ? 16 : (lg + 3)) / 4;
77  BROTLI_DCHECK(length > 0);
78  BROTLI_DCHECK(length <= (1 << 24));
79  BROTLI_DCHECK(lg <= 24);
80  *nibblesbits = mnibbles - 4;
81  *numbits = mnibbles * 4;
82  *bits = length - 1;
83 }
84 
86  const Command* cmd, size_t* storage_ix, uint8_t* storage) {
87  uint32_t copylen_code = CommandCopyLenCode(cmd);
88  uint16_t inscode = GetInsertLengthCode(cmd->insert_len_);
89  uint16_t copycode = GetCopyLengthCode(copylen_code);
90  uint32_t insnumextra = GetInsertExtra(inscode);
91  uint64_t insextraval = cmd->insert_len_ - GetInsertBase(inscode);
92  uint64_t copyextraval = copylen_code - GetCopyBase(copycode);
93  uint64_t bits = (copyextraval << insnumextra) | insextraval;
95  insnumextra + GetCopyExtra(copycode), bits, storage_ix, storage);
96 }
97 
98 /* Data structure that stores almost everything that is needed to encode each
99  block switch command. */
100 typedef struct BlockSplitCode {
107 
108 /* Stores a number between 0 and 255. */
109 static void StoreVarLenUint8(size_t n, size_t* storage_ix, uint8_t* storage) {
110  if (n == 0) {
111  BrotliWriteBits(1, 0, storage_ix, storage);
112  } else {
113  size_t nbits = Log2FloorNonZero(n);
114  BrotliWriteBits(1, 1, storage_ix, storage);
115  BrotliWriteBits(3, nbits, storage_ix, storage);
116  BrotliWriteBits(nbits, n - ((size_t)1 << nbits), storage_ix, storage);
117  }
118 }
119 
120 /* Stores the compressed meta-block header.
121  REQUIRES: length > 0
122  REQUIRES: length <= (1 << 24) */
123 static void StoreCompressedMetaBlockHeader(BROTLI_BOOL is_final_block,
124  size_t length,
125  size_t* storage_ix,
126  uint8_t* storage) {
127  uint64_t lenbits;
128  size_t nlenbits;
129  uint64_t nibblesbits;
130 
131  /* Write ISLAST bit. */
132  BrotliWriteBits(1, (uint64_t)is_final_block, storage_ix, storage);
133  /* Write ISEMPTY bit. */
134  if (is_final_block) {
135  BrotliWriteBits(1, 0, storage_ix, storage);
136  }
137 
138  BrotliEncodeMlen(length, &lenbits, &nlenbits, &nibblesbits);
139  BrotliWriteBits(2, nibblesbits, storage_ix, storage);
140  BrotliWriteBits(nlenbits, lenbits, storage_ix, storage);
141 
142  if (!is_final_block) {
143  /* Write ISUNCOMPRESSED bit. */
144  BrotliWriteBits(1, 0, storage_ix, storage);
145  }
146 }
147 
148 /* Stores the uncompressed meta-block header.
149  REQUIRES: length > 0
150  REQUIRES: length <= (1 << 24) */
152  size_t* storage_ix,
153  uint8_t* storage) {
154  uint64_t lenbits;
155  size_t nlenbits;
156  uint64_t nibblesbits;
157 
158  /* Write ISLAST bit.
159  Uncompressed block cannot be the last one, so set to 0. */
160  BrotliWriteBits(1, 0, storage_ix, storage);
161  BrotliEncodeMlen(length, &lenbits, &nlenbits, &nibblesbits);
162  BrotliWriteBits(2, nibblesbits, storage_ix, storage);
163  BrotliWriteBits(nlenbits, lenbits, storage_ix, storage);
164  /* Write ISUNCOMPRESSED bit. */
165  BrotliWriteBits(1, 1, storage_ix, storage);
166 }
167 
169  const int num_codes, const uint8_t* code_length_bitdepth,
170  size_t* storage_ix, uint8_t* storage) {
171  static const uint8_t kStorageOrder[BROTLI_CODE_LENGTH_CODES] = {
172  1, 2, 3, 4, 0, 5, 17, 6, 16, 7, 8, 9, 10, 11, 12, 13, 14, 15
173  };
174  /* The bit lengths of the Huffman code over the code length alphabet
175  are compressed with the following static Huffman code:
176  Symbol Code
177  ------ ----
178  0 00
179  1 1110
180  2 110
181  3 01
182  4 10
183  5 1111 */
184  static const uint8_t kHuffmanBitLengthHuffmanCodeSymbols[6] = {
185  0, 7, 3, 2, 1, 15
186  };
187  static const uint8_t kHuffmanBitLengthHuffmanCodeBitLengths[6] = {
188  2, 4, 3, 2, 2, 4
189  };
190 
191  size_t skip_some = 0; /* skips none. */
192 
193  /* Throw away trailing zeros: */
194  size_t codes_to_store = BROTLI_CODE_LENGTH_CODES;
195  if (num_codes > 1) {
196  for (; codes_to_store > 0; --codes_to_store) {
197  if (code_length_bitdepth[kStorageOrder[codes_to_store - 1]] != 0) {
198  break;
199  }
200  }
201  }
202  if (code_length_bitdepth[kStorageOrder[0]] == 0 &&
203  code_length_bitdepth[kStorageOrder[1]] == 0) {
204  skip_some = 2; /* skips two. */
205  if (code_length_bitdepth[kStorageOrder[2]] == 0) {
206  skip_some = 3; /* skips three. */
207  }
208  }
209  BrotliWriteBits(2, skip_some, storage_ix, storage);
210  {
211  size_t i;
212  for (i = skip_some; i < codes_to_store; ++i) {
213  size_t l = code_length_bitdepth[kStorageOrder[i]];
214  BrotliWriteBits(kHuffmanBitLengthHuffmanCodeBitLengths[l],
215  kHuffmanBitLengthHuffmanCodeSymbols[l], storage_ix, storage);
216  }
217  }
218 }
219 
221  const size_t huffman_tree_size, const uint8_t* huffman_tree,
222  const uint8_t* huffman_tree_extra_bits, const uint8_t* code_length_bitdepth,
223  const uint16_t* code_length_bitdepth_symbols,
224  size_t* BROTLI_RESTRICT storage_ix, uint8_t* BROTLI_RESTRICT storage) {
225  size_t i;
226  for (i = 0; i < huffman_tree_size; ++i) {
227  size_t ix = huffman_tree[i];
228  BrotliWriteBits(code_length_bitdepth[ix], code_length_bitdepth_symbols[ix],
229  storage_ix, storage);
230  /* Extra bits */
231  switch (ix) {
233  BrotliWriteBits(2, huffman_tree_extra_bits[i], storage_ix, storage);
234  break;
236  BrotliWriteBits(3, huffman_tree_extra_bits[i], storage_ix, storage);
237  break;
238  }
239  }
240 }
241 
242 static void StoreSimpleHuffmanTree(const uint8_t* depths,
243  size_t symbols[4],
244  size_t num_symbols,
245  size_t max_bits,
246  size_t* storage_ix, uint8_t* storage) {
247  /* value of 1 indicates a simple Huffman code */
248  BrotliWriteBits(2, 1, storage_ix, storage);
249  BrotliWriteBits(2, num_symbols - 1, storage_ix, storage); /* NSYM - 1 */
250 
251  {
252  /* Sort */
253  size_t i;
254  for (i = 0; i < num_symbols; i++) {
255  size_t j;
256  for (j = i + 1; j < num_symbols; j++) {
257  if (depths[symbols[j]] < depths[symbols[i]]) {
258  BROTLI_SWAP(size_t, symbols, j, i);
259  }
260  }
261  }
262  }
263 
264  if (num_symbols == 2) {
265  BrotliWriteBits(max_bits, symbols[0], storage_ix, storage);
266  BrotliWriteBits(max_bits, symbols[1], storage_ix, storage);
267  } else if (num_symbols == 3) {
268  BrotliWriteBits(max_bits, symbols[0], storage_ix, storage);
269  BrotliWriteBits(max_bits, symbols[1], storage_ix, storage);
270  BrotliWriteBits(max_bits, symbols[2], storage_ix, storage);
271  } else {
272  BrotliWriteBits(max_bits, symbols[0], storage_ix, storage);
273  BrotliWriteBits(max_bits, symbols[1], storage_ix, storage);
274  BrotliWriteBits(max_bits, symbols[2], storage_ix, storage);
275  BrotliWriteBits(max_bits, symbols[3], storage_ix, storage);
276  /* tree-select */
277  BrotliWriteBits(1, depths[symbols[0]] == 1 ? 1 : 0, storage_ix, storage);
278  }
279 }
280 
281 /* num = alphabet size
282  depths = symbol depths */
283 void BrotliStoreHuffmanTree(const uint8_t* depths, size_t num,
284  HuffmanTree* tree,
285  size_t* storage_ix, uint8_t* storage) {
286  /* Write the Huffman tree into the brotli-representation.
287  The command alphabet is the largest, so this allocation will fit all
288  alphabets. */
289  uint8_t huffman_tree[BROTLI_NUM_COMMAND_SYMBOLS];
290  uint8_t huffman_tree_extra_bits[BROTLI_NUM_COMMAND_SYMBOLS];
291  size_t huffman_tree_size = 0;
292  uint8_t code_length_bitdepth[BROTLI_CODE_LENGTH_CODES] = { 0 };
293  uint16_t code_length_bitdepth_symbols[BROTLI_CODE_LENGTH_CODES];
294  uint32_t huffman_tree_histogram[BROTLI_CODE_LENGTH_CODES] = { 0 };
295  size_t i;
296  int num_codes = 0;
297  size_t code = 0;
298 
300 
301  BrotliWriteHuffmanTree(depths, num, &huffman_tree_size, huffman_tree,
302  huffman_tree_extra_bits);
303 
304  /* Calculate the statistics of the Huffman tree in brotli-representation. */
305  for (i = 0; i < huffman_tree_size; ++i) {
306  ++huffman_tree_histogram[huffman_tree[i]];
307  }
308 
309  for (i = 0; i < BROTLI_CODE_LENGTH_CODES; ++i) {
310  if (huffman_tree_histogram[i]) {
311  if (num_codes == 0) {
312  code = i;
313  num_codes = 1;
314  } else if (num_codes == 1) {
315  num_codes = 2;
316  break;
317  }
318  }
319  }
320 
321  /* Calculate another Huffman tree to use for compressing both the
322  earlier Huffman tree with. */
323  BrotliCreateHuffmanTree(huffman_tree_histogram, BROTLI_CODE_LENGTH_CODES,
324  5, tree, code_length_bitdepth);
325  BrotliConvertBitDepthsToSymbols(code_length_bitdepth,
327  code_length_bitdepth_symbols);
328 
329  /* Now, we have all the data, let's start storing it */
330  BrotliStoreHuffmanTreeOfHuffmanTreeToBitMask(num_codes, code_length_bitdepth,
331  storage_ix, storage);
332 
333  if (num_codes == 1) {
334  code_length_bitdepth[code] = 0;
335  }
336 
337  /* Store the real Huffman tree now. */
338  BrotliStoreHuffmanTreeToBitMask(huffman_tree_size,
339  huffman_tree,
340  huffman_tree_extra_bits,
341  code_length_bitdepth,
342  code_length_bitdepth_symbols,
343  storage_ix, storage);
344 }
345 
346 /* Builds a Huffman tree from histogram[0:length] into depth[0:length] and
347  bits[0:length] and stores the encoded tree to the bit stream. */
348 static void BuildAndStoreHuffmanTree(const uint32_t* histogram,
349  const size_t histogram_length,
350  const size_t alphabet_size,
351  HuffmanTree* tree,
352  uint8_t* depth,
353  uint16_t* bits,
354  size_t* storage_ix,
355  uint8_t* storage) {
356  size_t count = 0;
357  size_t s4[4] = { 0 };
358  size_t i;
359  size_t max_bits = 0;
360  for (i = 0; i < histogram_length; i++) {
361  if (histogram[i]) {
362  if (count < 4) {
363  s4[count] = i;
364  } else if (count > 4) {
365  break;
366  }
367  count++;
368  }
369  }
370 
371  {
372  size_t max_bits_counter = alphabet_size - 1;
373  while (max_bits_counter) {
374  max_bits_counter >>= 1;
375  ++max_bits;
376  }
377  }
378 
379  if (count <= 1) {
380  BrotliWriteBits(4, 1, storage_ix, storage);
381  BrotliWriteBits(max_bits, s4[0], storage_ix, storage);
382  depth[s4[0]] = 0;
383  bits[s4[0]] = 0;
384  return;
385  }
386 
387  memset(depth, 0, histogram_length * sizeof(depth[0]));
388  BrotliCreateHuffmanTree(histogram, histogram_length, 15, tree, depth);
389  BrotliConvertBitDepthsToSymbols(depth, histogram_length, bits);
390 
391  if (count <= 4) {
392  StoreSimpleHuffmanTree(depth, s4, count, max_bits, storage_ix, storage);
393  } else {
394  BrotliStoreHuffmanTree(depth, histogram_length, tree, storage_ix, storage);
395  }
396 }
397 
399  const HuffmanTree* v0, const HuffmanTree* v1) {
400  return TO_BROTLI_BOOL(v0->total_count_ < v1->total_count_);
401 }
402 
404  const uint32_t* histogram,
405  const size_t histogram_total,
406  const size_t max_bits,
408  size_t* storage_ix,
409  uint8_t* storage) {
410  size_t count = 0;
411  size_t symbols[4] = { 0 };
412  size_t length = 0;
413  size_t total = histogram_total;
414  while (total != 0) {
415  if (histogram[length]) {
416  if (count < 4) {
417  symbols[count] = length;
418  }
419  ++count;
420  total -= histogram[length];
421  }
422  ++length;
423  }
424 
425  if (count <= 1) {
426  BrotliWriteBits(4, 1, storage_ix, storage);
427  BrotliWriteBits(max_bits, symbols[0], storage_ix, storage);
428  depth[symbols[0]] = 0;
429  bits[symbols[0]] = 0;
430  return;
431  }
432 
433  memset(depth, 0, length * sizeof(depth[0]));
434  {
435  const size_t max_tree_size = 2 * length + 1;
436  HuffmanTree* tree = BROTLI_ALLOC(m, HuffmanTree, max_tree_size);
437  uint32_t count_limit;
438  if (BROTLI_IS_OOM(m) || BROTLI_IS_NULL(tree)) return;
439  for (count_limit = 1; ; count_limit *= 2) {
440  HuffmanTree* node = tree;
441  size_t l;
442  for (l = length; l != 0;) {
443  --l;
444  if (histogram[l]) {
445  if (BROTLI_PREDICT_TRUE(histogram[l] >= count_limit)) {
446  InitHuffmanTree(node, histogram[l], -1, (int16_t)l);
447  } else {
448  InitHuffmanTree(node, count_limit, -1, (int16_t)l);
449  }
450  ++node;
451  }
452  }
453  {
454  const int n = (int)(node - tree);
456  int i = 0; /* Points to the next leaf node. */
457  int j = n + 1; /* Points to the next non-leaf node. */
458  int k;
459 
460  SortHuffmanTreeItems(tree, (size_t)n, SortHuffmanTree);
461  /* The nodes are:
462  [0, n): the sorted leaf nodes that we start with.
463  [n]: we add a sentinel here.
464  [n + 1, 2n): new parent nodes are added here, starting from
465  (n+1). These are naturally in ascending order.
466  [2n]: we add a sentinel at the end as well.
467  There will be (2n+1) elements at the end. */
469  *node++ = sentinel;
470  *node++ = sentinel;
471 
472  for (k = n - 1; k > 0; --k) {
473  int left, right;
474  if (tree[i].total_count_ <= tree[j].total_count_) {
475  left = i;
476  ++i;
477  } else {
478  left = j;
479  ++j;
480  }
481  if (tree[i].total_count_ <= tree[j].total_count_) {
482  right = i;
483  ++i;
484  } else {
485  right = j;
486  ++j;
487  }
488  /* The sentinel node becomes the parent node. */
489  node[-1].total_count_ =
490  tree[left].total_count_ + tree[right].total_count_;
491  node[-1].index_left_ = (int16_t)left;
492  node[-1].index_right_or_value_ = (int16_t)right;
493  /* Add back the last sentinel node. */
494  *node++ = sentinel;
495  }
496  if (BrotliSetDepth(2 * n - 1, tree, depth, 14)) {
497  /* We need to pack the Huffman tree in 14 bits. If this was not
498  successful, add fake entities to the lowest values and retry. */
499  break;
500  }
501  }
502  }
503  BROTLI_FREE(m, tree);
504  }
506  if (count <= 4) {
507  size_t i;
508  /* value of 1 indicates a simple Huffman code */
509  BrotliWriteBits(2, 1, storage_ix, storage);
510  BrotliWriteBits(2, count - 1, storage_ix, storage); /* NSYM - 1 */
511 
512  /* Sort */
513  for (i = 0; i < count; i++) {
514  size_t j;
515  for (j = i + 1; j < count; j++) {
516  if (depth[symbols[j]] < depth[symbols[i]]) {
517  BROTLI_SWAP(size_t, symbols, j, i);
518  }
519  }
520  }
521 
522  if (count == 2) {
523  BrotliWriteBits(max_bits, symbols[0], storage_ix, storage);
524  BrotliWriteBits(max_bits, symbols[1], storage_ix, storage);
525  } else if (count == 3) {
526  BrotliWriteBits(max_bits, symbols[0], storage_ix, storage);
527  BrotliWriteBits(max_bits, symbols[1], storage_ix, storage);
528  BrotliWriteBits(max_bits, symbols[2], storage_ix, storage);
529  } else {
530  BrotliWriteBits(max_bits, symbols[0], storage_ix, storage);
531  BrotliWriteBits(max_bits, symbols[1], storage_ix, storage);
532  BrotliWriteBits(max_bits, symbols[2], storage_ix, storage);
533  BrotliWriteBits(max_bits, symbols[3], storage_ix, storage);
534  /* tree-select */
535  BrotliWriteBits(1, depth[symbols[0]] == 1 ? 1 : 0, storage_ix, storage);
536  }
537  } else {
538  uint8_t previous_value = 8;
539  size_t i;
540  /* Complex Huffman Tree */
541  StoreStaticCodeLengthCode(storage_ix, storage);
542 
543  /* Actual RLE coding. */
544  for (i = 0; i < length;) {
545  const uint8_t value = depth[i];
546  size_t reps = 1;
547  size_t k;
548  for (k = i + 1; k < length && depth[k] == value; ++k) {
549  ++reps;
550  }
551  i += reps;
552  if (value == 0) {
554  storage_ix, storage);
555  } else {
556  if (previous_value != value) {
558  storage_ix, storage);
559  --reps;
560  }
561  if (reps < 3) {
562  while (reps != 0) {
563  reps--;
565  storage_ix, storage);
566  }
567  } else {
568  reps -= 3;
570  storage_ix, storage);
571  }
572  previous_value = value;
573  }
574  }
575  }
576 }
577 
578 static size_t IndexOf(const uint8_t* v, size_t v_size, uint8_t value) {
579  size_t i = 0;
580  for (; i < v_size; ++i) {
581  if (v[i] == value) return i;
582  }
583  return i;
584 }
585 
586 static void MoveToFront(uint8_t* v, size_t index) {
587  uint8_t value = v[index];
588  size_t i;
589  for (i = index; i != 0; --i) {
590  v[i] = v[i - 1];
591  }
592  v[0] = value;
593 }
594 
596  const size_t v_size,
597  uint32_t* v_out) {
598  size_t i;
599  uint8_t mtf[256];
600  uint32_t max_value;
601  if (v_size == 0) {
602  return;
603  }
604  max_value = v_in[0];
605  for (i = 1; i < v_size; ++i) {
606  if (v_in[i] > max_value) max_value = v_in[i];
607  }
608  BROTLI_DCHECK(max_value < 256u);
609  for (i = 0; i <= max_value; ++i) {
610  mtf[i] = (uint8_t)i;
611  }
612  {
613  size_t mtf_size = max_value + 1;
614  for (i = 0; i < v_size; ++i) {
615  size_t index = IndexOf(mtf, mtf_size, (uint8_t)v_in[i]);
616  BROTLI_DCHECK(index < mtf_size);
617  v_out[i] = (uint32_t)index;
618  MoveToFront(mtf, index);
619  }
620  }
621 }
622 
623 /* Finds runs of zeros in v[0..in_size) and replaces them with a prefix code of
624  the run length plus extra bits (lower 9 bits is the prefix code and the rest
625  are the extra bits). Non-zero values in v[] are shifted by
626  *max_length_prefix. Will not create prefix codes bigger than the initial
627  value of *max_run_length_prefix. The prefix code of run length L is simply
628  Log2Floor(L) and the number of extra bits is the same as the prefix code. */
629 static void RunLengthCodeZeros(const size_t in_size,
630  uint32_t* BROTLI_RESTRICT v, size_t* BROTLI_RESTRICT out_size,
631  uint32_t* BROTLI_RESTRICT max_run_length_prefix) {
632  uint32_t max_reps = 0;
633  size_t i;
634  uint32_t max_prefix;
635  for (i = 0; i < in_size;) {
636  uint32_t reps = 0;
637  for (; i < in_size && v[i] != 0; ++i) ;
638  for (; i < in_size && v[i] == 0; ++i) {
639  ++reps;
640  }
641  max_reps = BROTLI_MAX(uint32_t, reps, max_reps);
642  }
643  max_prefix = max_reps > 0 ? Log2FloorNonZero(max_reps) : 0;
644  max_prefix = BROTLI_MIN(uint32_t, max_prefix, *max_run_length_prefix);
645  *max_run_length_prefix = max_prefix;
646  *out_size = 0;
647  for (i = 0; i < in_size;) {
648  BROTLI_DCHECK(*out_size <= i);
649  if (v[i] != 0) {
650  v[*out_size] = v[i] + *max_run_length_prefix;
651  ++i;
652  ++(*out_size);
653  } else {
654  uint32_t reps = 1;
655  size_t k;
656  for (k = i + 1; k < in_size && v[k] == 0; ++k) {
657  ++reps;
658  }
659  i += reps;
660  while (reps != 0) {
661  if (reps < (2u << max_prefix)) {
662  uint32_t run_length_prefix = Log2FloorNonZero(reps);
663  const uint32_t extra_bits = reps - (1u << run_length_prefix);
664  v[*out_size] = run_length_prefix + (extra_bits << 9);
665  ++(*out_size);
666  break;
667  } else {
668  const uint32_t extra_bits = (1u << max_prefix) - 1u;
669  v[*out_size] = max_prefix + (extra_bits << 9);
670  reps -= (2u << max_prefix) - 1u;
671  ++(*out_size);
672  }
673  }
674  }
675  }
676 }
677 
678 #define SYMBOL_BITS 9
679 
681  const uint32_t* context_map,
682  size_t context_map_size,
683  size_t num_clusters,
684  HuffmanTree* tree,
685  size_t* storage_ix, uint8_t* storage) {
686  size_t i;
687  uint32_t* rle_symbols;
688  uint32_t max_run_length_prefix = 6;
689  size_t num_rle_symbols = 0;
691  static const uint32_t kSymbolMask = (1u << SYMBOL_BITS) - 1u;
694 
695  StoreVarLenUint8(num_clusters - 1, storage_ix, storage);
696 
697  if (num_clusters == 1) {
698  return;
699  }
700 
701  rle_symbols = BROTLI_ALLOC(m, uint32_t, context_map_size);
702  if (BROTLI_IS_OOM(m) || BROTLI_IS_NULL(rle_symbols)) return;
703  MoveToFrontTransform(context_map, context_map_size, rle_symbols);
704  RunLengthCodeZeros(context_map_size, rle_symbols,
705  &num_rle_symbols, &max_run_length_prefix);
706  memset(histogram, 0, sizeof(histogram));
707  for (i = 0; i < num_rle_symbols; ++i) {
708  ++histogram[rle_symbols[i] & kSymbolMask];
709  }
710  {
711  BROTLI_BOOL use_rle = TO_BROTLI_BOOL(max_run_length_prefix > 0);
712  BrotliWriteBits(1, (uint64_t)use_rle, storage_ix, storage);
713  if (use_rle) {
714  BrotliWriteBits(4, max_run_length_prefix - 1, storage_ix, storage);
715  }
716  }
717  BuildAndStoreHuffmanTree(histogram, num_clusters + max_run_length_prefix,
718  num_clusters + max_run_length_prefix,
719  tree, depths, bits, storage_ix, storage);
720  for (i = 0; i < num_rle_symbols; ++i) {
721  const uint32_t rle_symbol = rle_symbols[i] & kSymbolMask;
722  const uint32_t extra_bits_val = rle_symbols[i] >> SYMBOL_BITS;
723  BrotliWriteBits(depths[rle_symbol], bits[rle_symbol], storage_ix, storage);
724  if (rle_symbol > 0 && rle_symbol <= max_run_length_prefix) {
725  BrotliWriteBits(rle_symbol, extra_bits_val, storage_ix, storage);
726  }
727  }
728  BrotliWriteBits(1, 1, storage_ix, storage); /* use move-to-front */
729  BROTLI_FREE(m, rle_symbols);
730 }
731 
732 /* Stores the block switch command with index block_ix to the bit stream. */
734  const uint32_t block_len,
735  const uint8_t block_type,
736  BROTLI_BOOL is_first_block,
737  size_t* storage_ix,
738  uint8_t* storage) {
739  size_t typecode = NextBlockTypeCode(&code->type_code_calculator, block_type);
740  size_t lencode;
741  uint32_t len_nextra;
742  uint32_t len_extra;
743  if (!is_first_block) {
744  BrotliWriteBits(code->type_depths[typecode], code->type_bits[typecode],
745  storage_ix, storage);
746  }
747  GetBlockLengthPrefixCode(block_len, &lencode, &len_nextra, &len_extra);
748 
749  BrotliWriteBits(code->length_depths[lencode], code->length_bits[lencode],
750  storage_ix, storage);
751  BrotliWriteBits(len_nextra, len_extra, storage_ix, storage);
752 }
753 
754 /* Builds a BlockSplitCode data structure from the block split given by the
755  vector of block types and block lengths and stores it to the bit stream. */
757  const uint32_t* lengths,
758  const size_t num_blocks,
759  const size_t num_types,
760  HuffmanTree* tree,
762  size_t* storage_ix,
763  uint8_t* storage) {
766  size_t i;
767  BlockTypeCodeCalculator type_code_calculator;
768  memset(type_histo, 0, (num_types + 2) * sizeof(type_histo[0]));
769  memset(length_histo, 0, sizeof(length_histo));
770  InitBlockTypeCodeCalculator(&type_code_calculator);
771  for (i = 0; i < num_blocks; ++i) {
772  size_t type_code = NextBlockTypeCode(&type_code_calculator, types[i]);
773  if (i != 0) ++type_histo[type_code];
774  ++length_histo[BlockLengthPrefixCode(lengths[i])];
775  }
776  StoreVarLenUint8(num_types - 1, storage_ix, storage);
777  if (num_types > 1) { /* TODO: else? could StoreBlockSwitch occur? */
778  BuildAndStoreHuffmanTree(&type_histo[0], num_types + 2, num_types + 2, tree,
779  &code->type_depths[0], &code->type_bits[0],
780  storage_ix, storage);
783  tree, &code->length_depths[0],
784  &code->length_bits[0], storage_ix, storage);
785  StoreBlockSwitch(code, lengths[0], types[0], 1, storage_ix, storage);
786  }
787 }
788 
789 /* Stores a context map where the histogram type is always the block type. */
790 static void StoreTrivialContextMap(size_t num_types,
791  size_t context_bits,
792  HuffmanTree* tree,
793  size_t* storage_ix,
794  uint8_t* storage) {
795  StoreVarLenUint8(num_types - 1, storage_ix, storage);
796  if (num_types > 1) {
797  size_t repeat_code = context_bits - 1u;
798  size_t repeat_bits = (1u << repeat_code) - 1u;
799  size_t alphabet_size = num_types + repeat_code;
803  size_t i;
804  memset(histogram, 0, alphabet_size * sizeof(histogram[0]));
805  /* Write RLEMAX. */
806  BrotliWriteBits(1, 1, storage_ix, storage);
807  BrotliWriteBits(4, repeat_code - 1, storage_ix, storage);
808  histogram[repeat_code] = (uint32_t)num_types;
809  histogram[0] = 1;
810  for (i = context_bits; i < alphabet_size; ++i) {
811  histogram[i] = 1;
812  }
813  BuildAndStoreHuffmanTree(histogram, alphabet_size, alphabet_size,
814  tree, depths, bits, storage_ix, storage);
815  for (i = 0; i < num_types; ++i) {
816  size_t code = (i == 0 ? 0 : i + context_bits - 1);
817  BrotliWriteBits(depths[code], bits[code], storage_ix, storage);
819  depths[repeat_code], bits[repeat_code], storage_ix, storage);
820  BrotliWriteBits(repeat_code, repeat_bits, storage_ix, storage);
821  }
822  /* Write IMTF (inverse-move-to-front) bit. */
823  BrotliWriteBits(1, 1, storage_ix, storage);
824  }
825 }
826 
827 /* Manages the encoding of one block category (literal, command or distance). */
828 typedef struct BlockEncoder {
831  const uint8_t* block_types_; /* Not owned. */
832  const uint32_t* block_lengths_; /* Not owned. */
833  size_t num_blocks_;
835  size_t block_ix_;
836  size_t block_len_;
837  size_t entropy_ix_;
841 
842 static void InitBlockEncoder(BlockEncoder* self, size_t histogram_length,
843  size_t num_block_types, const uint8_t* block_types,
844  const uint32_t* block_lengths, const size_t num_blocks) {
845  self->histogram_length_ = histogram_length;
846  self->num_block_types_ = num_block_types;
847  self->block_types_ = block_types;
848  self->block_lengths_ = block_lengths;
849  self->num_blocks_ = num_blocks;
850  InitBlockTypeCodeCalculator(&self->block_split_code_.type_code_calculator);
851  self->block_ix_ = 0;
852  self->block_len_ = num_blocks == 0 ? 0 : block_lengths[0];
853  self->entropy_ix_ = 0;
854  self->depths_ = 0;
855  self->bits_ = 0;
856 }
857 
859  BROTLI_FREE(m, self->depths_);
860  BROTLI_FREE(m, self->bits_);
861 }
862 
863 /* Creates entropy codes of block lengths and block types and stores them
864  to the bit stream. */
866  HuffmanTree* tree, size_t* storage_ix, uint8_t* storage) {
867  BuildAndStoreBlockSplitCode(self->block_types_, self->block_lengths_,
868  self->num_blocks_, self->num_block_types_, tree, &self->block_split_code_,
869  storage_ix, storage);
870 }
871 
872 /* Stores the next symbol with the entropy code of the current block type.
873  Updates the block type and block length at block boundaries. */
874 static void StoreSymbol(BlockEncoder* self, size_t symbol, size_t* storage_ix,
875  uint8_t* storage) {
876  if (self->block_len_ == 0) {
877  size_t block_ix = ++self->block_ix_;
878  uint32_t block_len = self->block_lengths_[block_ix];
879  uint8_t block_type = self->block_types_[block_ix];
880  self->block_len_ = block_len;
881  self->entropy_ix_ = block_type * self->histogram_length_;
882  StoreBlockSwitch(&self->block_split_code_, block_len, block_type, 0,
883  storage_ix, storage);
884  }
885  --self->block_len_;
886  {
887  size_t ix = self->entropy_ix_ + symbol;
888  BrotliWriteBits(self->depths_[ix], self->bits_[ix], storage_ix, storage);
889  }
890 }
891 
892 /* Stores the next symbol with the entropy code of the current block type and
893  context value.
894  Updates the block type and block length at block boundaries. */
895 static void StoreSymbolWithContext(BlockEncoder* self, size_t symbol,
896  size_t context, const uint32_t* context_map, size_t* storage_ix,
897  uint8_t* storage, const size_t context_bits) {
898  if (self->block_len_ == 0) {
899  size_t block_ix = ++self->block_ix_;
900  uint32_t block_len = self->block_lengths_[block_ix];
901  uint8_t block_type = self->block_types_[block_ix];
902  self->block_len_ = block_len;
903  self->entropy_ix_ = (size_t)block_type << context_bits;
904  StoreBlockSwitch(&self->block_split_code_, block_len, block_type, 0,
905  storage_ix, storage);
906  }
907  --self->block_len_;
908  {
909  size_t histo_ix = context_map[self->entropy_ix_ + context];
910  size_t ix = histo_ix * self->histogram_length_ + symbol;
911  BrotliWriteBits(self->depths_[ix], self->bits_[ix], storage_ix, storage);
912  }
913 }
914 
915 #define FN(X) X ## Literal
916 /* NOLINTNEXTLINE(build/include) */
917 #include "./block_encoder_inc.h"
918 #undef FN
919 
920 #define FN(X) X ## Command
921 /* NOLINTNEXTLINE(build/include) */
922 #include "./block_encoder_inc.h"
923 #undef FN
924 
925 #define FN(X) X ## Distance
926 /* NOLINTNEXTLINE(build/include) */
927 #include "./block_encoder_inc.h"
928 #undef FN
929 
930 static void JumpToByteBoundary(size_t* storage_ix, uint8_t* storage) {
931  *storage_ix = (*storage_ix + 7u) & ~7u;
932  storage[*storage_ix >> 3] = 0;
933 }
934 
936  const uint8_t* input, size_t start_pos, size_t length, size_t mask,
937  uint8_t prev_byte, uint8_t prev_byte2, BROTLI_BOOL is_last,
938  const BrotliEncoderParams* params, ContextType literal_context_mode,
939  const Command* commands, size_t n_commands, const MetaBlockSplit* mb,
940  size_t* storage_ix, uint8_t* storage) {
941 
942  size_t pos = start_pos;
943  size_t i;
944  uint32_t num_distance_symbols = params->dist.alphabet_size_max;
945  uint32_t num_effective_distance_symbols = params->dist.alphabet_size_limit;
946  HuffmanTree* tree;
947  ContextLut literal_context_lut = BROTLI_CONTEXT_LUT(literal_context_mode);
948  BlockEncoder literal_enc;
949  BlockEncoder command_enc;
950  BlockEncoder distance_enc;
951  const BrotliDistanceParams* dist = &params->dist;
953  num_effective_distance_symbols <= BROTLI_NUM_HISTOGRAM_DISTANCE_SYMBOLS);
954 
955  StoreCompressedMetaBlockHeader(is_last, length, storage_ix, storage);
956 
958  if (BROTLI_IS_OOM(m) || BROTLI_IS_NULL(tree)) return;
965  InitBlockEncoder(&distance_enc, num_effective_distance_symbols,
968 
969  BuildAndStoreBlockSwitchEntropyCodes(&literal_enc, tree, storage_ix, storage);
970  BuildAndStoreBlockSwitchEntropyCodes(&command_enc, tree, storage_ix, storage);
972  &distance_enc, tree, storage_ix, storage);
973 
974  BrotliWriteBits(2, dist->distance_postfix_bits, storage_ix, storage);
976  4, dist->num_direct_distance_codes >> dist->distance_postfix_bits,
977  storage_ix, storage);
978  for (i = 0; i < mb->literal_split.num_types; ++i) {
979  BrotliWriteBits(2, literal_context_mode, storage_ix, storage);
980  }
981 
982  if (mb->literal_context_map_size == 0) {
984  BROTLI_LITERAL_CONTEXT_BITS, tree, storage_ix, storage);
985  } else {
988  mb->literal_histograms_size, tree, storage_ix, storage);
989  if (BROTLI_IS_OOM(m)) return;
990  }
991 
992  if (mb->distance_context_map_size == 0) {
994  BROTLI_DISTANCE_CONTEXT_BITS, tree, storage_ix, storage);
995  } else {
998  mb->distance_histograms_size, tree, storage_ix, storage);
999  if (BROTLI_IS_OOM(m)) return;
1000  }
1001 
1002  BuildAndStoreEntropyCodesLiteral(m, &literal_enc, mb->literal_histograms,
1004  storage_ix, storage);
1005  if (BROTLI_IS_OOM(m)) return;
1006  BuildAndStoreEntropyCodesCommand(m, &command_enc, mb->command_histograms,
1008  storage_ix, storage);
1009  if (BROTLI_IS_OOM(m)) return;
1010  BuildAndStoreEntropyCodesDistance(m, &distance_enc, mb->distance_histograms,
1011  mb->distance_histograms_size, num_distance_symbols, tree,
1012  storage_ix, storage);
1013  if (BROTLI_IS_OOM(m)) return;
1014  BROTLI_FREE(m, tree);
1015 
1016  for (i = 0; i < n_commands; ++i) {
1017  const Command cmd = commands[i];
1018  size_t cmd_code = cmd.cmd_prefix_;
1019  StoreSymbol(&command_enc, cmd_code, storage_ix, storage);
1020  StoreCommandExtra(&cmd, storage_ix, storage);
1021  if (mb->literal_context_map_size == 0) {
1022  size_t j;
1023  for (j = cmd.insert_len_; j != 0; --j) {
1024  StoreSymbol(&literal_enc, input[pos & mask], storage_ix, storage);
1025  ++pos;
1026  }
1027  } else {
1028  size_t j;
1029  for (j = cmd.insert_len_; j != 0; --j) {
1030  size_t context =
1031  BROTLI_CONTEXT(prev_byte, prev_byte2, literal_context_lut);
1032  uint8_t literal = input[pos & mask];
1033  StoreSymbolWithContext(&literal_enc, literal, context,
1034  mb->literal_context_map, storage_ix, storage,
1036  prev_byte2 = prev_byte;
1037  prev_byte = literal;
1038  ++pos;
1039  }
1040  }
1041  pos += CommandCopyLen(&cmd);
1042  if (CommandCopyLen(&cmd)) {
1043  prev_byte2 = input[(pos - 2) & mask];
1044  prev_byte = input[(pos - 1) & mask];
1045  if (cmd.cmd_prefix_ >= 128) {
1046  size_t dist_code = cmd.dist_prefix_ & 0x3FF;
1047  uint32_t distnumextra = cmd.dist_prefix_ >> 10;
1048  uint64_t distextra = cmd.dist_extra_;
1049  if (mb->distance_context_map_size == 0) {
1050  StoreSymbol(&distance_enc, dist_code, storage_ix, storage);
1051  } else {
1052  size_t context = CommandDistanceContext(&cmd);
1053  StoreSymbolWithContext(&distance_enc, dist_code, context,
1054  mb->distance_context_map, storage_ix, storage,
1056  }
1057  BrotliWriteBits(distnumextra, distextra, storage_ix, storage);
1058  }
1059  }
1060  }
1061  CleanupBlockEncoder(m, &distance_enc);
1062  CleanupBlockEncoder(m, &command_enc);
1063  CleanupBlockEncoder(m, &literal_enc);
1064  if (is_last) {
1065  JumpToByteBoundary(storage_ix, storage);
1066  }
1067 }
1068 
1069 static void BuildHistograms(const uint8_t* input,
1070  size_t start_pos,
1071  size_t mask,
1072  const Command* commands,
1073  size_t n_commands,
1074  HistogramLiteral* lit_histo,
1075  HistogramCommand* cmd_histo,
1076  HistogramDistance* dist_histo) {
1077  size_t pos = start_pos;
1078  size_t i;
1079  for (i = 0; i < n_commands; ++i) {
1080  const Command cmd = commands[i];
1081  size_t j;
1082  HistogramAddCommand(cmd_histo, cmd.cmd_prefix_);
1083  for (j = cmd.insert_len_; j != 0; --j) {
1084  HistogramAddLiteral(lit_histo, input[pos & mask]);
1085  ++pos;
1086  }
1087  pos += CommandCopyLen(&cmd);
1088  if (CommandCopyLen(&cmd) && cmd.cmd_prefix_ >= 128) {
1089  HistogramAddDistance(dist_histo, cmd.dist_prefix_ & 0x3FF);
1090  }
1091  }
1092 }
1093 
1095  size_t start_pos,
1096  size_t mask,
1097  const Command* commands,
1098  size_t n_commands,
1099  const uint8_t* lit_depth,
1100  const uint16_t* lit_bits,
1101  const uint8_t* cmd_depth,
1102  const uint16_t* cmd_bits,
1103  const uint8_t* dist_depth,
1104  const uint16_t* dist_bits,
1105  size_t* storage_ix,
1106  uint8_t* storage) {
1107  size_t pos = start_pos;
1108  size_t i;
1109  for (i = 0; i < n_commands; ++i) {
1110  const Command cmd = commands[i];
1111  const size_t cmd_code = cmd.cmd_prefix_;
1112  size_t j;
1114  cmd_depth[cmd_code], cmd_bits[cmd_code], storage_ix, storage);
1115  StoreCommandExtra(&cmd, storage_ix, storage);
1116  for (j = cmd.insert_len_; j != 0; --j) {
1117  const uint8_t literal = input[pos & mask];
1119  lit_depth[literal], lit_bits[literal], storage_ix, storage);
1120  ++pos;
1121  }
1122  pos += CommandCopyLen(&cmd);
1123  if (CommandCopyLen(&cmd) && cmd.cmd_prefix_ >= 128) {
1124  const size_t dist_code = cmd.dist_prefix_ & 0x3FF;
1125  const uint32_t distnumextra = cmd.dist_prefix_ >> 10;
1126  const uint32_t distextra = cmd.dist_extra_;
1127  BrotliWriteBits(dist_depth[dist_code], dist_bits[dist_code],
1128  storage_ix, storage);
1129  BrotliWriteBits(distnumextra, distextra, storage_ix, storage);
1130  }
1131  }
1132 }
1133 
1135  const uint8_t* input, size_t start_pos, size_t length, size_t mask,
1136  BROTLI_BOOL is_last, const BrotliEncoderParams* params,
1137  const Command* commands, size_t n_commands,
1138  size_t* storage_ix, uint8_t* storage) {
1139  HistogramLiteral lit_histo;
1140  HistogramCommand cmd_histo;
1141  HistogramDistance dist_histo;
1148  HuffmanTree* tree;
1149  uint32_t num_distance_symbols = params->dist.alphabet_size_max;
1150 
1151  StoreCompressedMetaBlockHeader(is_last, length, storage_ix, storage);
1152 
1153  HistogramClearLiteral(&lit_histo);
1154  HistogramClearCommand(&cmd_histo);
1155  HistogramClearDistance(&dist_histo);
1156 
1157  BuildHistograms(input, start_pos, mask, commands, n_commands,
1158  &lit_histo, &cmd_histo, &dist_histo);
1159 
1160  BrotliWriteBits(13, 0, storage_ix, storage);
1161 
1163  if (BROTLI_IS_OOM(m) || BROTLI_IS_NULL(tree)) return;
1166  lit_depth, lit_bits,
1167  storage_ix, storage);
1170  cmd_depth, cmd_bits,
1171  storage_ix, storage);
1173  num_distance_symbols, tree,
1174  dist_depth, dist_bits,
1175  storage_ix, storage);
1176  BROTLI_FREE(m, tree);
1178  n_commands, lit_depth, lit_bits,
1179  cmd_depth, cmd_bits,
1180  dist_depth, dist_bits,
1181  storage_ix, storage);
1182  if (is_last) {
1183  JumpToByteBoundary(storage_ix, storage);
1184  }
1185 }
1186 
1188  const uint8_t* input, size_t start_pos, size_t length, size_t mask,
1189  BROTLI_BOOL is_last, const BrotliEncoderParams* params,
1190  const Command* commands, size_t n_commands,
1191  size_t* storage_ix, uint8_t* storage) {
1192  uint32_t num_distance_symbols = params->dist.alphabet_size_max;
1193  uint32_t distance_alphabet_bits =
1194  Log2FloorNonZero(num_distance_symbols - 1) + 1;
1195 
1196  StoreCompressedMetaBlockHeader(is_last, length, storage_ix, storage);
1197 
1198  BrotliWriteBits(13, 0, storage_ix, storage);
1199 
1200  if (n_commands <= 128) {
1201  uint32_t histogram[BROTLI_NUM_LITERAL_SYMBOLS] = { 0 };
1202  size_t pos = start_pos;
1203  size_t num_literals = 0;
1204  size_t i;
1207  for (i = 0; i < n_commands; ++i) {
1208  const Command cmd = commands[i];
1209  size_t j;
1210  for (j = cmd.insert_len_; j != 0; --j) {
1211  ++histogram[input[pos & mask]];
1212  ++pos;
1213  }
1214  num_literals += cmd.insert_len_;
1215  pos += CommandCopyLen(&cmd);
1216  }
1217  BrotliBuildAndStoreHuffmanTreeFast(m, histogram, num_literals,
1218  /* max_bits = */ 8,
1219  lit_depth, lit_bits,
1220  storage_ix, storage);
1221  if (BROTLI_IS_OOM(m)) return;
1225  n_commands, lit_depth, lit_bits,
1230  storage_ix, storage);
1231  } else {
1232  HistogramLiteral lit_histo;
1233  HistogramCommand cmd_histo;
1234  HistogramDistance dist_histo;
1241  HistogramClearLiteral(&lit_histo);
1242  HistogramClearCommand(&cmd_histo);
1243  HistogramClearDistance(&dist_histo);
1244  BuildHistograms(input, start_pos, mask, commands, n_commands,
1245  &lit_histo, &cmd_histo, &dist_histo);
1246  BrotliBuildAndStoreHuffmanTreeFast(m, lit_histo.data_,
1247  lit_histo.total_count_,
1248  /* max_bits = */ 8,
1249  lit_depth, lit_bits,
1250  storage_ix, storage);
1251  if (BROTLI_IS_OOM(m)) return;
1252  BrotliBuildAndStoreHuffmanTreeFast(m, cmd_histo.data_,
1253  cmd_histo.total_count_,
1254  /* max_bits = */ 10,
1255  cmd_depth, cmd_bits,
1256  storage_ix, storage);
1257  if (BROTLI_IS_OOM(m)) return;
1258  BrotliBuildAndStoreHuffmanTreeFast(m, dist_histo.data_,
1259  dist_histo.total_count_,
1260  /* max_bits = */
1261  distance_alphabet_bits,
1262  dist_depth, dist_bits,
1263  storage_ix, storage);
1264  if (BROTLI_IS_OOM(m)) return;
1266  n_commands, lit_depth, lit_bits,
1267  cmd_depth, cmd_bits,
1268  dist_depth, dist_bits,
1269  storage_ix, storage);
1270  }
1271 
1272  if (is_last) {
1273  JumpToByteBoundary(storage_ix, storage);
1274  }
1275 }
1276 
1277 /* This is for storing uncompressed blocks (simple raw storage of
1278  bytes-as-bytes). */
1280  const uint8_t* BROTLI_RESTRICT input,
1281  size_t position, size_t mask,
1282  size_t len,
1283  size_t* BROTLI_RESTRICT storage_ix,
1285  size_t masked_pos = position & mask;
1287  JumpToByteBoundary(storage_ix, storage);
1288 
1289  if (masked_pos + len > mask + 1) {
1290  size_t len1 = mask + 1 - masked_pos;
1291  memcpy(&storage[*storage_ix >> 3], &input[masked_pos], len1);
1292  *storage_ix += len1 << 3;
1293  len -= len1;
1294  masked_pos = 0;
1295  }
1296  memcpy(&storage[*storage_ix >> 3], &input[masked_pos], len);
1297  *storage_ix += len << 3;
1298 
1299  /* We need to clear the next 4 bytes to continue to be
1300  compatible with BrotliWriteBits. */
1301  BrotliWriteBitsPrepareStorage(*storage_ix, storage);
1302 
1303  /* Since the uncompressed block itself may not be the final block, add an
1304  empty one after this. */
1305  if (is_final_block) {
1306  BrotliWriteBits(1, 1, storage_ix, storage); /* islast */
1307  BrotliWriteBits(1, 1, storage_ix, storage); /* isempty */
1308  JumpToByteBoundary(storage_ix, storage);
1309  }
1310 }
1311 
1312 #if defined(__cplusplus) || defined(c_plusplus)
1313 } /* extern "C" */
1314 #endif
return _Result< 0 ? -1 :_Result;} #line 1069 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vsnwprintf_s_l(wchar_t *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsnwprintf_s((*__local_stdio_printf_options()), _Buffer, _BufferCount, _MaxCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1091 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vsnwprintf_s(wchar_t *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, wchar_t const *const _Format, va_list _ArgList) { return _vsnwprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);} #line 1108 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snwprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snwprintf(wchar_t *_Buffer, size_t _BufferCount, wchar_t const *_Format,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnwprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsnwprintf(wchar_t *_Buffer, size_t _BufferCount, wchar_t const *_Format, va_list _Args);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnwprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsnwprintf(wchar_t *_Buffer, size_t _BufferCount, wchar_t const *_Format, va_list _ArgList) { return _vsnwprintf_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1133 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_c_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1163 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_c(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1179 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vswprintf_c_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);} #line 1196 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl __vswprintf_l(wchar_t *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vswprintf_l(_Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 1212 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf(wchar_t *const _Buffer, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_l(_Buffer,(size_t) -1, _Format,((void *) 0), _ArgList);} #line 1227 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl vswprintf(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1243 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_s_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf_s((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1264 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl vswprintf_s(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1281 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #line 1283 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_p_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf_p((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1312 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_p(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_p_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1328 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vscwprintf_l(wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf((*__local_stdio_printf_options())|(1ULL<< 1),((void *) 0), 0, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1347 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vscwprintf(wchar_t const *const _Format, va_list _ArgList) { return _vscwprintf_l(_Format,((void *) 0), _ArgList);} #line 1361 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vscwprintf_p_l(wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf_p((*__local_stdio_printf_options())|(1ULL<< 1),((void *) 0), 0, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1380 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vscwprintf_p(wchar_t const *const _Format, va_list _ArgList) { return _vscwprintf_p_l(_Format,((void *) 0), _ArgList);} #line 1394 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl __swprintf_l(wchar_t *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__vswprintf_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1414 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_c_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1435 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf(wchar_t *const _Buffer, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__vswprintf_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1454 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl swprintf(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1474 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "__swprintf_l_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl __swprintf_l(wchar_t *_Buffer, wchar_t const *_Format, _locale_t _Locale,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vswprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl __vswprintf_l(wchar_t *_Buffer, wchar_t const *_Format, _locale_t _Locale, va_list _Args);__declspec(deprecated("This function or variable may be unsafe. Consider using " "swprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _swprintf(wchar_t *_Buffer, wchar_t const *_Format,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "vswprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vswprintf(wchar_t *_Buffer, wchar_t const *_Format, va_list _Args);__inline int __cdecl _swprintf_s_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_s_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1511 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl swprintf_s(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1532 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #line 1534 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_p_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_p_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1562 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_p(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_p_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1582 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_c_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_c_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1603 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_c(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1623 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snwprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snwprintf_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwprintf_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1646 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwprintf(wchar_t *_Buffer, size_t _BufferCount, wchar_t const *_Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwprintf_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1668 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwprintf_s_l(wchar_t *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1690 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwprintf_s(wchar_t *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1711 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _scwprintf_l(wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscwprintf_l(_Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1737 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _scwprintf(wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscwprintf_l(_Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1755 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _scwprintf_p_l(wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscwprintf_p_l(_Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1774 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _scwprintf_p(wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscwprintf_p_l(_Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1792 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #pragma warning(push) #pragma warning(disable:4141 6054) #pragma warning(pop) #line 1856 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" int __cdecl __stdio_common_vswscanf(unsigned __int64 _Options, wchar_t const *_Buffer, size_t _BufferCount, wchar_t const *_Format, _locale_t _Locale, va_list _ArgList);__inline int __cdecl _vswscanf_l(wchar_t const *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vswscanf((*__local_stdio_scanf_options()), _Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 1897 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl vswscanf(wchar_t const *_Buffer, wchar_t const *_Format, va_list _ArgList) { return _vswscanf_l(_Buffer, _Format,((void *) 0), _ArgList);} #line 1912 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswscanf_s_l(wchar_t const *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vswscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 1930 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl vswscanf_s(wchar_t const *const _Buffer, wchar_t const *const _Format, va_list _ArgList) { return _vswscanf_s_l(_Buffer, _Format,((void *) 0), _ArgList);} #line 1947 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #line 1949 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnwscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsnwscanf_l(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vswscanf((*__local_stdio_scanf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);} #line 1976 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vsnwscanf_s_l(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vswscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer, _BufferCount, _Format, _Locale, _ArgList);} #line 1995 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_swscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _swscanf_l(wchar_t const *const _Buffer, wchar_t const *const _Format, _locale_t _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswscanf_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2015 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "swscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl swscanf(wchar_t const *const _Buffer, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswscanf_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2034 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swscanf_s_l(wchar_t const *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswscanf_s_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2054 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl swscanf_s(wchar_t const *const _Buffer, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswscanf_s_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2075 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #line 2077 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snwscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snwscanf_l(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwscanf_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2100 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snwscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snwscanf(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwscanf_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2122 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwscanf_s_l(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwscanf_s_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2143 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwscanf_s(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwscanf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2163 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __pragma(pack(pop))#pragma warning(pop) #pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) typedef __int64 fpos_t;errno_t __cdecl _get_stream_buffer_pointers(FILE *_Stream, char ***_Base, char ***_Pointer, int **_Count);errno_t __cdecl clearerr_s(FILE *_Stream);errno_t __cdecl fopen_s(FILE **_Stream, char const *_FileName, char const *_Mode);size_t __cdecl fread_s(void *_Buffer, size_t _BufferSize, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);errno_t __cdecl freopen_s(FILE **_Stream, char const *_FileName, char const *_Mode, FILE *_OldStream);char *__cdecl gets_s(char *_Buffer, rsize_t _Size);errno_t __cdecl tmpfile_s(FILE **_Stream);errno_t __cdecl tmpnam_s(char *_Buffer, rsize_t _Size);#line 145 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" void __cdecl clearerr(FILE *_Stream);int __cdecl fclose(FILE *_Stream);int __cdecl _fcloseall(void);FILE *__cdecl _fdopen(int _FileHandle, char const *_Mode);int __cdecl feof(FILE *_Stream);int __cdecl ferror(FILE *_Stream);int __cdecl fflush(FILE *_Stream);int __cdecl fgetc(FILE *_Stream);int __cdecl _fgetchar(void);int __cdecl fgetpos(FILE *_Stream, fpos_t *_Position);char *__cdecl fgets(char *_Buffer, int _MaxCount, FILE *_Stream);int __cdecl _fileno(FILE *_Stream);int __cdecl _flushall(void);__declspec(deprecated("This function or variable may be unsafe. Consider using " "fopen_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) FILE *__cdecl fopen(char const *_FileName, char const *_Mode);int __cdecl fputc(int _Character, FILE *_Stream);int __cdecl _fputchar(int _Character);int __cdecl fputs(char const *_Buffer, FILE *_Stream);size_t __cdecl fread(void *_Buffer, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);__declspec(deprecated("This function or variable may be unsafe. Consider using " "freopen_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) FILE *__cdecl freopen(char const *_FileName, char const *_Mode, FILE *_Stream);FILE *__cdecl _fsopen(char const *_FileName, char const *_Mode, int _ShFlag);int __cdecl fsetpos(FILE *_Stream, fpos_t const *_Position);int __cdecl fseek(FILE *_Stream, long _Offset, int _Origin);int __cdecl _fseeki64(FILE *_Stream, __int64 _Offset, int _Origin);long __cdecl ftell(FILE *_Stream);__int64 __cdecl _ftelli64(FILE *_Stream);size_t __cdecl fwrite(void const *_Buffer, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);int __cdecl getc(FILE *_Stream);int __cdecl getchar(void);int __cdecl _getmaxstdio(void);int __cdecl _getw(FILE *_Stream);void __cdecl perror(char const *_ErrorMessage);int __cdecl _pclose(FILE *_Stream);FILE *__cdecl _popen(char const *_Command, char const *_Mode);#line 344 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl putc(int _Character, FILE *_Stream);int __cdecl putchar(int _Character);int __cdecl puts(char const *_Buffer);int __cdecl _putw(int _Word, FILE *_Stream);int __cdecl remove(char const *_FileName);int __cdecl rename(char const *_OldFileName, char const *_NewFileName);int __cdecl _unlink(char const *_FileName);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_unlink" ". See online help for details.")) int __cdecl unlink(char const *_FileName);#line 391 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" void __cdecl rewind(FILE *_Stream);int __cdecl _rmtmp(void);__declspec(deprecated("This function or variable may be unsafe. Consider using " "setvbuf" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) void __cdecl setbuf(FILE *_Stream, char *_Buffer);int __cdecl _setmaxstdio(int _Maximum);int __cdecl setvbuf(FILE *_Stream, char *_Buffer, int _Mode, size_t _Size);__declspec(allocator) char *__cdecl _tempnam(char const *_DirectoryName, char const *_FilePrefix);__declspec(deprecated("This function or variable may be unsafe. Consider using " "tmpfile_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) FILE *__cdecl tmpfile(void);__declspec(deprecated("This function or variable may be unsafe. Consider using " "tmpnam_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl tmpnam(char *_Buffer);int __cdecl ungetc(int _Character, FILE *_Stream);void __cdecl _lock_file(FILE *_Stream);void __cdecl _unlock_file(FILE *_Stream);int __cdecl _fclose_nolock(FILE *_Stream);int __cdecl _fflush_nolock(FILE *_Stream);int __cdecl _fgetc_nolock(FILE *_Stream);int __cdecl _fputc_nolock(int _Character, FILE *_Stream);size_t __cdecl _fread_nolock(void *_Buffer, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);size_t __cdecl _fread_nolock_s(void *_Buffer, size_t _BufferSize, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);int __cdecl _fseek_nolock(FILE *_Stream, long _Offset, int _Origin);int __cdecl _fseeki64_nolock(FILE *_Stream, __int64 _Offset, int _Origin);long __cdecl _ftell_nolock(FILE *_Stream);__int64 __cdecl _ftelli64_nolock(FILE *_Stream);size_t __cdecl _fwrite_nolock(void const *_Buffer, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);int __cdecl _getc_nolock(FILE *_Stream);int __cdecl _putc_nolock(int _Character, FILE *_Stream);int __cdecl _ungetc_nolock(int _Character, FILE *_Stream);int *__cdecl __p__commode(void);#line 596 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl __stdio_common_vfprintf(unsigned __int64 _Options, FILE *_Stream, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vfprintf_s(unsigned __int64 _Options, FILE *_Stream, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vfprintf_p(unsigned __int64 _Options, FILE *_Stream, char const *_Format, _locale_t _Locale, va_list _ArgList);__inline int __cdecl _vfprintf_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfprintf((*__local_stdio_printf_options()), _Stream, _Format, _Locale, _ArgList);} #line 648 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vfprintf(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfprintf_l(_Stream, _Format,((void *) 0), _ArgList);} #line 662 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vfprintf_s_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfprintf_s((*__local_stdio_printf_options()), _Stream, _Format, _Locale, _ArgList);} #line 677 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vfprintf_s(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfprintf_s_l(_Stream, _Format,((void *) 0), _ArgList);} #line 693 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 695 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vfprintf_p_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfprintf_p((*__local_stdio_printf_options()), _Stream, _Format, _Locale, _ArgList);} #line 710 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vfprintf_p(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfprintf_p_l(_Stream, _Format,((void *) 0), _ArgList);} #line 724 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vprintf_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfprintf_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);} #line 738 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vprintf(char const *const _Format, va_list _ArgList) { return _vfprintf_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);} #line 751 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vprintf_s_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfprintf_s_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);} #line 765 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vprintf_s(char const *const _Format, va_list _ArgList) { return _vfprintf_s_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);} #line 780 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 782 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vprintf_p_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfprintf_p_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);} #line 796 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vprintf_p(char const *const _Format, va_list _ArgList) { return _vfprintf_p_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);} #line 809 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _fprintf_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 828 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl fprintf(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 846 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl _set_printf_count_output(int _Value);int __cdecl _get_printf_count_output(void);__inline int __cdecl _fprintf_s_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_s_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 871 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl fprintf_s(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_s_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 891 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 893 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _fprintf_p_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_p_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 912 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _fprintf_p(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_p_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 930 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _printf_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 948 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl printf(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 965 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _printf_s_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_s_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 983 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl printf_s(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_s_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1002 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1004 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _printf_p_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_p_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1022 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _printf_p(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_p_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1039 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl __stdio_common_vfscanf(unsigned __int64 _Options, FILE *_Stream, char const *_Format, _locale_t _Locale, va_list _Arglist);__inline int __cdecl _vfscanf_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfscanf((*__local_stdio_scanf_options()), _Stream, _Format, _Locale, _ArgList);} #line 1070 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vfscanf(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfscanf_l(_Stream, _Format,((void *) 0), _ArgList);} #line 1084 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vfscanf_s_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Stream, _Format, _Locale, _ArgList);} #line 1101 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vfscanf_s(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfscanf_s_l(_Stream, _Format,((void *) 0), _ArgList);} #line 1118 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1120 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscanf_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfscanf_l((__acrt_iob_func(0)), _Format, _Locale, _ArgList);} #line 1134 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vscanf(char const *const _Format, va_list _ArgList) { return _vfscanf_l((__acrt_iob_func(0)), _Format,((void *) 0), _ArgList);} #line 1147 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscanf_s_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfscanf_s_l((__acrt_iob_func(0)), _Format, _Locale, _ArgList);} #line 1161 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vscanf_s(char const *const _Format, va_list _ArgList) { return _vfscanf_s_l((__acrt_iob_func(0)), _Format,((void *) 0), _ArgList);} #line 1176 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1178 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_fscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _fscanf_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1197 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "fscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl fscanf(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1215 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _fscanf_s_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_s_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1234 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl fscanf_s(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_s_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1254 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1256 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_scanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _scanf_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_l((__acrt_iob_func(0)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1274 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "scanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl scanf(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_l((__acrt_iob_func(0)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1291 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scanf_s_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_s_l((__acrt_iob_func(0)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1309 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl scanf_s(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_s_l((__acrt_iob_func(0)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1328 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1330 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl __stdio_common_vsprintf(unsigned __int64 _Options, char *_Buffer, size_t _BufferCount, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vsprintf_s(unsigned __int64 _Options, char *_Buffer, size_t _BufferCount, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vsnprintf_s(unsigned __int64 _Options, char *_Buffer, size_t _BufferCount, size_t _MaxCount, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vsprintf_p(unsigned __int64 _Options, char *_Buffer, size_t _BufferCount, char const *_Format, _locale_t _Locale, va_list _ArgList);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsnprintf_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf((*__local_stdio_printf_options())|(1ULL<< 0), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1399 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { return _vsnprintf_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1415 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vsnprintf(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { int const _Result=__stdio_common_vsprintf((*__local_stdio_printf_options())|(1ULL<< 1), _Buffer, _BufferCount, _Format,((void *) 0), _ArgList);return _Result< 0 ? -1 :_Result;} #line 1446 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsprintf_l(char *const _Buffer, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vsnprintf_l(_Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 1462 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "vsprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl vsprintf(char *const _Buffer, char const *const _Format, va_list _ArgList) { return _vsnprintf_l(_Buffer,(size_t) -1, _Format,((void *) 0), _ArgList);} #line 1477 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsprintf_s_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf_s((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1498 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vsprintf_s(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { return _vsprintf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1516 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1526 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsprintf_p_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf_p((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1547 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsprintf_p(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { return _vsprintf_p_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1563 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf_s_l(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsnprintf_s((*__local_stdio_printf_options()), _Buffer, _BufferCount, _MaxCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1585 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf_s(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format, va_list _ArgList) { return _vsnprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);} #line 1602 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vsnprintf_s(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format, va_list _ArgList) { return _vsnprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);} #line 1630 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1641 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscprintf_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf((*__local_stdio_printf_options())|(1ULL<< 1),((void *) 0), 0, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1659 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscprintf(char const *const _Format, va_list _ArgList) { return _vscprintf_l(_Format,((void *) 0), _ArgList);} #line 1672 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscprintf_p_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf_p((*__local_stdio_printf_options())|(1ULL<< 1),((void *) 0), 0, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1690 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscprintf_p(char const *const _Format, va_list _ArgList) { return _vscprintf_p_l(_Format,((void *) 0), _ArgList);} #line 1703 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf_c_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1723 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf_c(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { return _vsnprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1739 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_sprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _sprintf_l(char *const _Buffer, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1761 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl sprintf(char *const _Buffer, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1782 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "sprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) int __cdecl sprintf(char *_Buffer, char const *_Format,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "vsprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) int __cdecl vsprintf(char *_Buffer, char const *_Format, va_list _Args);__inline int __cdecl _sprintf_s_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_s_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1810 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl sprintf_s(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1832 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1834 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _sprintf_p_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_p_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1862 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _sprintf_p(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_p_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1882 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snprintf_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1905 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl snprintf(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=vsnprintf(_Buffer, _BufferCount, _Format, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1936 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snprintf(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf(_Buffer, _BufferCount, _Format, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1956 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) int __cdecl _snprintf(char *_Buffer, size_t _BufferCount, char const *_Format,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) int __cdecl _vsnprintf(char *_Buffer, size_t _BufferCount, char const *_Format, va_list _Args);__inline int __cdecl _snprintf_c_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_c_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1986 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snprintf_c(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2006 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snprintf_s_l(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2028 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snprintf_s(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2049 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scprintf_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscprintf_l(_Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2075 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scprintf(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscprintf_l(_Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2092 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scprintf_p_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscprintf_p_l(_Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2110 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scprintf_p(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscprintf_p(_Format, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2127 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl __stdio_common_vsscanf(unsigned __int64 _Options, char const *_Buffer, size_t _BufferCount, char const *_Format, _locale_t _Locale, va_list _ArgList);__inline int __cdecl _vsscanf_l(char const *const _Buffer, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vsscanf((*__local_stdio_scanf_options()), _Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 2158 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vsscanf(char const *const _Buffer, char const *const _Format, va_list _ArgList) { return _vsscanf_l(_Buffer, _Format,((void *) 0), _ArgList);} #line 2172 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsscanf_s_l(char const *const _Buffer, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vsscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 2189 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #pragma warning(push) #pragma warning(disable:6530) __inline int __cdecl vsscanf_s(char const *const _Buffer, char const *const _Format, va_list _ArgList) { return _vsscanf_s_l(_Buffer, _Format,((void *) 0), _ArgList);} #line 2208 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #pragma warning(pop) #line 2219 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_sscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _sscanf_l(char const *const _Buffer, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsscanf_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2238 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "sscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl sscanf(char const *const _Buffer, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsscanf_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2256 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _sscanf_s_l(char const *const _Buffer, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsscanf_s_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2275 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl sscanf_s(char const *const _Buffer, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=vsscanf_s(_Buffer, _Format, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2297 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 2299 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #pragma warning(push) #pragma warning(disable:6530) __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snscanf_l(char const *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__stdio_common_vsscanf((*__local_stdio_scanf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2326 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snscanf(char const *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__stdio_common_vsscanf((*__local_stdio_scanf_options()), _Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2349 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snscanf_s_l(char const *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__stdio_common_vsscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2374 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snscanf_s(char const *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__stdio_common_vsscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2397 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #pragma warning(pop) __declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_tempnam" ". See online help for details.")) char *__cdecl tempnam(char const *_Directory, char const *_FilePrefix);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fcloseall" ". See online help for details.")) int __cdecl fcloseall(void);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fdopen" ". See online help for details.")) FILE *__cdecl fdopen(int _FileHandle, char const *_Format);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fgetchar" ". See online help for details.")) int __cdecl fgetchar(void);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fileno" ". See online help for details.")) int __cdecl fileno(FILE *_Stream);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_flushall" ". See online help for details.")) int __cdecl flushall(void);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fputchar" ". See online help for details.")) int __cdecl fputchar(int _Ch);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_getw" ". See online help for details.")) int __cdecl getw(FILE *_Stream);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_putw" ". See online help for details.")) int __cdecl putw(int _Ch, FILE *_Stream);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_rmtmp" ". See online help for details.")) int __cdecl rmtmp(void);#line 2441 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h"__pragma(pack(pop))#pragma warning(pop) #pragma once#pragma once#pragma once#pragma once#pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) int *__cdecl _errno(void);errno_t __cdecl _set_errno(int _Value);errno_t __cdecl _get_errno(int *_Value);unsigned long *__cdecl __doserrno(void);errno_t __cdecl _set_doserrno(unsigned long _Value);errno_t __cdecl _get_doserrno(unsigned long *_Value);__pragma(pack(pop))#pragma warning(pop) #pragma once#pragma warning(push)#pragma warning(disable:4514 4820) __pragma(pack(push, 8)) void *__cdecl memchr(void const *_Buf, int _Val, size_t _MaxCount);int __cdecl memcmp(void const *_Buf1, void const *_Buf2, size_t _Size);void *__cdecl memcpy(void *_Dst, void const *_Src, size_t _Size);void *__cdecl memmove(void *_Dst, void const *_Src, size_t _Size);void *__cdecl memset(void *_Dst, int _Val, size_t _Size);char *__cdecl strchr(char const *_Str, int _Val);char *__cdecl strrchr(char const *_Str, int _Ch);char *__cdecl strstr(char const *_Str, char const *_SubStr);wchar_t *__cdecl wcschr(wchar_t const *_Str, wchar_t _Ch);wchar_t *__cdecl wcsrchr(wchar_t const *_Str, wchar_t _Ch);wchar_t *__cdecl wcsstr(wchar_t const *_Str, wchar_t const *_SubStr);__pragma(pack(pop))#pragma warning(pop) #pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) static __inline errno_t __cdecl memcpy_s(void *const _Destination, rsize_t const _DestinationSize, void const *const _Source, rsize_t const _SourceSize) { if(_SourceSize==0) { return 0;} { int _Expr_val=!!(_Destination !=((void *) 0));if(!(_Expr_val)) {(*_errno())=22;_invalid_parameter_noinfo();return 22;} } ;if(_Source==((void *) 0)||_DestinationSize< _SourceSize) { memset(_Destination, 0, _DestinationSize);{ int _Expr_val=!!(_Source !=((void *) 0));if(!(_Expr_val)) {(*_errno())=22;_invalid_parameter_noinfo();return 22;} } ;{ int _Expr_val=!!(_DestinationSize >=_SourceSize);if(!(_Expr_val)) {(*_errno())=34;_invalid_parameter_noinfo();return 34;} } ;return 22 ;} memcpy(_Destination, _Source, _SourceSize);return 0;} static __inline errno_t __cdecl memmove_s(void *const _Destination, rsize_t const _DestinationSize, void const *const _Source, rsize_t const _SourceSize) { if(_SourceSize==0) { return 0;} { int _Expr_val=!!(_Destination !=((void *) 0));if(!(_Expr_val)) {(*_errno())=22;_invalid_parameter_noinfo();return 22;} } ;{ int _Expr_val=!!(_Source !=((void *) 0));if(!(_Expr_val)) {(*_errno())=22;_invalid_parameter_noinfo();return 22;} } ;{ int _Expr_val=!!(_DestinationSize >=_SourceSize);if(!(_Expr_val)) {(*_errno())=34;_invalid_parameter_noinfo();return 34;} } ;memmove(_Destination, _Source, _SourceSize);return 0;}#pragma warning(pop) __pragma(pack(pop))#pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) int __cdecl _memicmp(void const *_Buf1, void const *_Buf2, size_t _Size);int __cdecl _memicmp_l(void const *_Buf1, void const *_Buf2, size_t _Size, _locale_t _Locale);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_memccpy" ". See online help for details.")) void *__cdecl memccpy(void *_Dst, void const *_Src, int _Val, size_t _Size);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_memicmp" ". See online help for details.")) int __cdecl memicmp(void const *_Buf1, void const *_Buf2, size_t _Size);__pragma(pack(pop))#pragma warning(pop) #pragma once#pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) errno_t __cdecl wcscat_s(wchar_t *_Destination, rsize_t _SizeInWords, wchar_t const *_Source);errno_t __cdecl wcscpy_s(wchar_t *_Destination, rsize_t _SizeInWords, wchar_t const *_Source);errno_t __cdecl wcsncat_s(wchar_t *_Destination, rsize_t _SizeInWords, wchar_t const *_Source, rsize_t _MaxCount);errno_t __cdecl wcsncpy_s(wchar_t *_Destination, rsize_t _SizeInWords, wchar_t const *_Source, rsize_t _MaxCount);wchar_t *__cdecl wcstok_s(wchar_t *_String, wchar_t const *_Delimiter, wchar_t **_Context);__declspec(allocator) wchar_t *__cdecl _wcsdup(wchar_t const *_String);__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcscat_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcscat(wchar_t *_Destination, wchar_t const *_Source);int __cdecl wcscmp(wchar_t const *_String1, wchar_t const *_String2);__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcscpy_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcscpy(wchar_t *_Destination, wchar_t const *_Source);size_t __cdecl wcscspn(wchar_t const *_String, wchar_t const *_Control);size_t __cdecl wcslen(wchar_t const *_String);size_t __cdecl wcsnlen(wchar_t const *_Source, size_t _MaxCount);static __inline size_t __cdecl wcsnlen_s(wchar_t const *_Source, size_t _MaxCount) { return(_Source==0) ? 0 :wcsnlen(_Source, _MaxCount);}__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcsncat_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcsncat(wchar_t *_Destination, wchar_t const *_Source, size_t _Count);int __cdecl wcsncmp(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcsncpy_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcsncpy(wchar_t *_Destination, wchar_t const *_Source, size_t _Count);wchar_t *__cdecl wcspbrk(wchar_t const *_String, wchar_t const *_Control);size_t __cdecl wcsspn(wchar_t const *_String, wchar_t const *_Control);__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcstok_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcstok(wchar_t *_String, wchar_t const *_Delimiter, wchar_t **_Context);#line 237 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstring.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "wcstok_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) static __inline wchar_t *__cdecl _wcstok(wchar_t *const _String, wchar_t const *const _Delimiter) { return wcstok(_String, _Delimiter, 0);} __declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcserror_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcserror(int _ErrorNumber);errno_t __cdecl _wcserror_s(wchar_t *_Buffer, size_t _SizeInWords, int _ErrorNumber);__declspec(deprecated("This function or variable may be unsafe. Consider using " "__wcserror_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl __wcserror(wchar_t const *_String);errno_t __cdecl __wcserror_s(wchar_t *_Buffer, size_t _SizeInWords, wchar_t const *_ErrorMessage);int __cdecl _wcsicmp(wchar_t const *_String1, wchar_t const *_String2);int __cdecl _wcsicmp_l(wchar_t const *_String1, wchar_t const *_String2, _locale_t _Locale);int __cdecl _wcsnicmp(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);int __cdecl _wcsnicmp_l(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount, _locale_t _Locale);errno_t __cdecl _wcsnset_s(wchar_t *_Destination, size_t _SizeInWords, wchar_t _Value, size_t _MaxCount);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcsnset_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcsnset(wchar_t *_String, wchar_t _Value, size_t _MaxCount);wchar_t *__cdecl _wcsrev(wchar_t *_String);errno_t __cdecl _wcsset_s(wchar_t *_Destination, size_t _SizeInWords, wchar_t _Value);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcsset_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcsset(wchar_t *_String, wchar_t _Value);errno_t __cdecl _wcslwr_s(wchar_t *_String, size_t _SizeInWords);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcslwr_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcslwr(wchar_t *_String);errno_t __cdecl _wcslwr_s_l(wchar_t *_String, size_t _SizeInWords, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcslwr_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcslwr_l(wchar_t *_String, _locale_t _Locale);errno_t __cdecl _wcsupr_s(wchar_t *_String, size_t _Size);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcsupr_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcsupr(wchar_t *_String);errno_t __cdecl _wcsupr_s_l(wchar_t *_String, size_t _Size, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcsupr_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcsupr_l(wchar_t *_String, _locale_t _Locale);size_t __cdecl wcsxfrm(wchar_t *_Destination, wchar_t const *_Source, size_t _MaxCount);size_t __cdecl _wcsxfrm_l(wchar_t *_Destination, wchar_t const *_Source, size_t _MaxCount, _locale_t _Locale);int __cdecl wcscoll(wchar_t const *_String1, wchar_t const *_String2);int __cdecl _wcscoll_l(wchar_t const *_String1, wchar_t const *_String2, _locale_t _Locale);int __cdecl _wcsicoll(wchar_t const *_String1, wchar_t const *_String2);int __cdecl _wcsicoll_l(wchar_t const *_String1, wchar_t const *_String2, _locale_t _Locale);int __cdecl _wcsncoll(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);int __cdecl _wcsncoll_l(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount, _locale_t _Locale);int __cdecl _wcsnicoll(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);int __cdecl _wcsnicoll_l(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount, _locale_t _Locale);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsdup" ". See online help for details.")) wchar_t *__cdecl wcsdup(wchar_t const *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsicmp" ". See online help for details.")) int __cdecl wcsicmp(wchar_t const *_String1, wchar_t const *_String2);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsnicmp" ". See online help for details.")) int __cdecl wcsnicmp(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsnset" ". See online help for details.")) wchar_t *__cdecl wcsnset(wchar_t *_String, wchar_t _Value, size_t _MaxCount);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsrev" ". See online help for details.")) wchar_t *__cdecl wcsrev(wchar_t *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsset" ". See online help for details.")) wchar_t *__cdecl wcsset(wchar_t *_String, wchar_t _Value);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcslwr" ". See online help for details.")) wchar_t *__cdecl wcslwr(wchar_t *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsupr" ". See online help for details.")) wchar_t *__cdecl wcsupr(wchar_t *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsicoll" ". See online help for details.")) int __cdecl wcsicoll(wchar_t const *_String1, wchar_t const *_String2);__pragma(pack(pop))#pragma warning(pop) #pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) errno_t __cdecl strcpy_s(char *_Destination, rsize_t _SizeInBytes, char const *_Source);errno_t __cdecl strcat_s(char *_Destination, rsize_t _SizeInBytes, char const *_Source);errno_t __cdecl strerror_s(char *_Buffer, size_t _SizeInBytes, int _ErrorNumber);errno_t __cdecl strncat_s(char *_Destination, rsize_t _SizeInBytes, char const *_Source, rsize_t _MaxCount);errno_t __cdecl strncpy_s(char *_Destination, rsize_t _SizeInBytes, char const *_Source, rsize_t _MaxCount);char *__cdecl strtok_s(char *_String, char const *_Delimiter, char **_Context);void *__cdecl _memccpy(void *_Dst, void const *_Src, int _Val, size_t _MaxCount);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strcat_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strcat(char *_Destination, char const *_Source);int __cdecl strcmp(char const *_Str1, char const *_Str2);int __cdecl _strcmpi(char const *_String1, char const *_String2);int __cdecl strcoll(char const *_String1, char const *_String2);int __cdecl _strcoll_l(char const *_String1, char const *_String2, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strcpy_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strcpy(char *_Destination, char const *_Source);size_t __cdecl strcspn(char const *_Str, char const *_Control);__declspec(allocator) char *__cdecl _strdup(char const *_Source);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strerror_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strerror(char const *_ErrorMessage);errno_t __cdecl _strerror_s(char *_Buffer, size_t _SizeInBytes, char const *_ErrorMessage);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strerror_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strerror(int _ErrorMessage);int __cdecl _stricmp(char const *_String1, char const *_String2);int __cdecl _stricoll(char const *_String1, char const *_String2);int __cdecl _stricoll_l(char const *_String1, char const *_String2, _locale_t _Locale);int __cdecl _stricmp_l(char const *_String1, char const *_String2, _locale_t _Locale);size_t __cdecl strlen(char const *_Str);errno_t __cdecl _strlwr_s(char *_String, size_t _Size);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strlwr_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strlwr(char *_String);errno_t __cdecl _strlwr_s_l(char *_String, size_t _Size, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strlwr_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strlwr_l(char *_String, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strncat_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strncat(char *_Destination, char const *_Source, size_t _Count);int __cdecl strncmp(char const *_Str1, char const *_Str2, size_t _MaxCount);int __cdecl _strnicmp(char const *_String1, char const *_String2, size_t _MaxCount);int __cdecl _strnicmp_l(char const *_String1, char const *_String2, size_t _MaxCount, _locale_t _Locale);int __cdecl _strnicoll(char const *_String1, char const *_String2, size_t _MaxCount);int __cdecl _strnicoll_l(char const *_String1, char const *_String2, size_t _MaxCount, _locale_t _Locale);int __cdecl _strncoll(char const *_String1, char const *_String2, size_t _MaxCount);int __cdecl _strncoll_l(char const *_String1, char const *_String2, size_t _MaxCount, _locale_t _Locale);size_t __cdecl __strncnt(char const *_String, size_t _Count);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strncpy_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strncpy(char *_Destination, char const *_Source, size_t _Count);size_t __cdecl strnlen(char const *_String, size_t _MaxCount);static __inline size_t __cdecl strnlen_s(char const *_String, size_t _MaxCount) { return _String==0 ? 0 :strnlen(_String, _MaxCount);} errno_t __cdecl _strnset_s(char *_String, size_t _SizeInBytes, int _Value, size_t _MaxCount);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strnset_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strnset(char *_Destination, int _Value, size_t _Count);char *__cdecl strpbrk(char const *_Str, char const *_Control);char *__cdecl _strrev(char *_Str);errno_t __cdecl _strset_s(char *_Destination, size_t _DestinationSize, int _Value);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strset_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strset(char *_Destination, int _Value);size_t __cdecl strspn(char const *_Str, char const *_Control);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strtok_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strtok(char *_String, char const *_Delimiter);errno_t __cdecl _strupr_s(char *_String, size_t _Size);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strupr_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strupr(char *_String);errno_t __cdecl _strupr_s_l(char *_String, size_t _Size, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strupr_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strupr_l(char *_String, _locale_t _Locale);size_t __cdecl strxfrm(char *_Destination, char const *_Source, size_t _MaxCount);size_t __cdecl _strxfrm_l(char *_Destination, char const *_Source, size_t _MaxCount, _locale_t _Locale);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strdup" ". See online help for details.")) char *__cdecl strdup(char const *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strcmpi" ". See online help for details.")) int __cdecl strcmpi(char const *_String1, char const *_String2);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_stricmp" ". See online help for details.")) int __cdecl stricmp(char const *_String1, char const *_String2);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strlwr" ". See online help for details.")) char *__cdecl strlwr(char *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strnicmp" ". See online help for details.")) int __cdecl strnicmp(char const *_String1, char const *_String2, size_t _MaxCount);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strnset" ". See online help for details.")) char *__cdecl strnset(char *_String, int _Value, size_t _MaxCount);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strrev" ". See online help for details.")) char *__cdecl strrev(char *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strset" ". See online help for details.")) char *__cdecl strset(char *_String, int _Value);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strupr" ". See online help for details.")) char *__cdecl strupr(char *_String);__pragma(pack(pop))#pragma warning(pop) #pragma once#pragma warning(push)#pragma warning(disable:4514 4820) __pragma(pack(push, 8)) __pragma(pack(pop))#pragma warning(pop) #pragma once#pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) typedef unsigned short _ino_t;typedef _ino_t ino_t;#line 24 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\sys/types.h" typedef unsigned int _dev_t;typedef _dev_t dev_t;#line 36 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\sys/types.h" typedef long _off_t;typedef _off_t off_t;#line 48 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\sys/types.h"#pragma warning(pop) typedef char *sds;#pragma pack(push, 1) struct sdshdr5 { unsigned char flags;char buf[];};struct sdshdr8 { uint8_t len;uint8_t alloc;unsigned char flags;char buf[];};struct sdshdr16 { uint16_t len;uint16_t alloc;unsigned char flags;char buf[];};struct sdshdr32 { uint32_t len;uint32_t alloc;unsigned char flags;char buf[];};struct sdshdr64 { uint64_t len;uint64_t alloc;unsigned char flags;char buf[];};#pragma pack(pop) static inline size_t sdslen(const sds s) { unsigned char flags=s[-1];switch(flags &7) { case 0 :return((flags) >> 3) ;case 1 :return((struct sdshdr8 *)((s) -(sizeof(struct sdshdr8)))) ->len;case 2 :return((struct sdshdr16 *)((s) -(sizeof(struct sdshdr16)))) ->len;case 3 :return((struct sdshdr32 *)((s) -(sizeof(struct sdshdr32)))) ->len;case 4 :return((struct sdshdr64 *)((s) -(sizeof(struct sdshdr64)))) ->len;} return 0;}static inline size_t sdsavail(const sds s) { unsigned char flags=s[-1];switch(flags &7) { case 0 :{ return 0;} case 1 :{ struct sdshdr8 *sh=(void *)((s) -(sizeof(struct sdshdr8)));;return sh->alloc - sh->len;} case 2 :{ struct sdshdr16 *sh=(void *)((s) -(sizeof(struct sdshdr16)));;return sh->alloc - sh->len;} case 3 :{ struct sdshdr32 *sh=(void *)((s) -(sizeof(struct sdshdr32)));;return sh->alloc - sh->len;} case 4 :{ struct sdshdr64 *sh=(void *)((s) -(sizeof(struct sdshdr64)));;return sh->alloc - sh->len;} } return 0;}static inline void sdssetlen(sds s, size_t newlen) { unsigned char flags=s[-1];switch(flags &7) { case 0 :{ unsigned char *fp=((unsigned char *) s) - 1;*fp=0|(newlen<< 3);} break;case 1 :((struct sdshdr8 *)((s) -(sizeof(struct sdshdr8)))) ->len=(uint8_t) newlen;break;case 2 :((struct sdshdr16 *)((s) -(sizeof(struct sdshdr16)))) ->len=(uint16_t) newlen;break;case 3 :((struct sdshdr32 *)((s) -(sizeof(struct sdshdr32)))) -> len
Definition: CPAL.d:15583
int code
Definition: aftopl.c:52
#define type(a)
Definition: aptex-macros.h:171
#define depth(a)
Definition: aptex-macros.h:199
#define count(a)
Definition: aptex-macros.h:781
static char * dist
Definition: aptex-src.c:59
static void CleanupBlockEncoder(MemoryManager *m, BlockEncoder *self)
#define MAX_SIMPLE_DISTANCE_ALPHABET_SIZE
static BROTLI_INLINE BROTLI_BOOL SortHuffmanTree(const HuffmanTree *v0, const HuffmanTree *v1)
static void BrotliStoreHuffmanTreeOfHuffmanTreeToBitMask(const int num_codes, const uint8_t *code_length_bitdepth, size_t *storage_ix, uint8_t *storage)
static void BuildAndStoreBlockSwitchEntropyCodes(BlockEncoder *self, HuffmanTree *tree, size_t *storage_ix, uint8_t *storage)
void BrotliStoreMetaBlockTrivial(MemoryManager *m, const uint8_t *input, size_t start_pos, size_t length, size_t mask, BROTLI_BOOL is_last, const BrotliEncoderParams *params, const Command *commands, size_t n_commands, size_t *storage_ix, uint8_t *storage)
static void BrotliStoreHuffmanTreeToBitMask(const size_t huffman_tree_size, const uint8_t *huffman_tree, const uint8_t *huffman_tree_extra_bits, const uint8_t *code_length_bitdepth, const uint16_t *code_length_bitdepth_symbols, size_t *BROTLI_RESTRICT storage_ix, uint8_t *BROTLI_RESTRICT storage)
#define SYMBOL_BITS
static size_t IndexOf(const uint8_t *v, size_t v_size, uint8_t value)
static void StoreSymbol(BlockEncoder *self, size_t symbol, size_t *storage_ix, uint8_t *storage)
static void StoreTrivialContextMap(size_t num_types, size_t context_bits, HuffmanTree *tree, size_t *storage_ix, uint8_t *storage)
struct BlockTypeCodeCalculator BlockTypeCodeCalculator
static BROTLI_INLINE size_t NextBlockTypeCode(BlockTypeCodeCalculator *calculator, uint8_t type)
static void JumpToByteBoundary(size_t *storage_ix, uint8_t *storage)
static void InitBlockEncoder(BlockEncoder *self, size_t histogram_length, size_t num_block_types, const uint8_t *block_types, const uint32_t *block_lengths, const size_t num_blocks)
struct BlockEncoder BlockEncoder
static BROTLI_INLINE void StoreCommandExtra(const Command *cmd, size_t *storage_ix, uint8_t *storage)
static void StoreSymbolWithContext(BlockEncoder *self, size_t symbol, size_t context, const uint32_t *context_map, size_t *storage_ix, uint8_t *storage, const size_t context_bits)
static void EncodeContextMap(MemoryManager *m, const uint32_t *context_map, size_t context_map_size, size_t num_clusters, HuffmanTree *tree, size_t *storage_ix, uint8_t *storage)
static BROTLI_INLINE uint32_t BlockLengthPrefixCode(uint32_t len)
static void BuildAndStoreBlockSplitCode(const uint8_t *types, const uint32_t *lengths, const size_t num_blocks, const size_t num_types, HuffmanTree *tree, BlockSplitCode *code, size_t *storage_ix, uint8_t *storage)
static void StoreDataWithHuffmanCodes(const uint8_t *input, size_t start_pos, size_t mask, const Command *commands, size_t n_commands, const uint8_t *lit_depth, const uint16_t *lit_bits, const uint8_t *cmd_depth, const uint16_t *cmd_bits, const uint8_t *dist_depth, const uint16_t *dist_bits, size_t *storage_ix, uint8_t *storage)
static void RunLengthCodeZeros(const size_t in_size, uint32_t *BROTLI_RESTRICT v, size_t *BROTLI_RESTRICT out_size, uint32_t *BROTLI_RESTRICT max_run_length_prefix)
void BrotliStoreMetaBlockFast(MemoryManager *m, const uint8_t *input, size_t start_pos, size_t length, size_t mask, BROTLI_BOOL is_last, const BrotliEncoderParams *params, const Command *commands, size_t n_commands, size_t *storage_ix, uint8_t *storage)
void BrotliStoreMetaBlock(MemoryManager *m, const uint8_t *input, size_t start_pos, size_t length, size_t mask, uint8_t prev_byte, uint8_t prev_byte2, BROTLI_BOOL is_last, const BrotliEncoderParams *params, ContextType literal_context_mode, const Command *commands, size_t n_commands, const MetaBlockSplit *mb, size_t *storage_ix, uint8_t *storage)
struct BlockSplitCode BlockSplitCode
static void MoveToFrontTransform(const uint32_t *BROTLI_RESTRICT v_in, const size_t v_size, uint32_t *v_out)
static void StoreCompressedMetaBlockHeader(BROTLI_BOOL is_final_block, size_t length, size_t *storage_ix, uint8_t *storage)
#define MAX_HUFFMAN_TREE_SIZE
static void StoreVarLenUint8(size_t n, size_t *storage_ix, uint8_t *storage)
static void InitBlockTypeCodeCalculator(BlockTypeCodeCalculator *self)
static void MoveToFront(uint8_t *v, size_t index)
static void BuildHistograms(const uint8_t *input, size_t start_pos, size_t mask, const Command *commands, size_t n_commands, HistogramLiteral *lit_histo, HistogramCommand *cmd_histo, HistogramDistance *dist_histo)
static BROTLI_INLINE void GetBlockLengthPrefixCode(uint32_t len, size_t *code, uint32_t *n_extra, uint32_t *extra)
void BrotliBuildAndStoreHuffmanTreeFast(MemoryManager *m, const uint32_t *histogram, const size_t histogram_total, const size_t max_bits, uint8_t *depth, uint16_t *bits, size_t *storage_ix, uint8_t *storage)
static void BrotliEncodeMlen(size_t length, uint64_t *bits, size_t *numbits, uint64_t *nibblesbits)
static void StoreSimpleHuffmanTree(const uint8_t *depths, size_t symbols[4], size_t num_symbols, size_t max_bits, size_t *storage_ix, uint8_t *storage)
static void BrotliStoreUncompressedMetaBlockHeader(size_t length, size_t *storage_ix, uint8_t *storage)
static void BuildAndStoreHuffmanTree(const uint32_t *histogram, const size_t histogram_length, const size_t alphabet_size, HuffmanTree *tree, uint8_t *depth, uint16_t *bits, size_t *storage_ix, uint8_t *storage)
void BrotliStoreUncompressedMetaBlock(BROTLI_BOOL is_final_block, const uint8_t *BROTLI_RESTRICT input, size_t position, size_t mask, size_t len, size_t *BROTLI_RESTRICT storage_ix, uint8_t *BROTLI_RESTRICT storage)
void BrotliStoreHuffmanTree(const uint8_t *depths, size_t num, HuffmanTree *tree, size_t *storage_ix, uint8_t *storage)
static BROTLI_INLINE void StoreBlockSwitch(BlockSplitCode *code, const uint32_t block_len, const uint8_t block_type, BROTLI_BOOL is_first_block, size_t *storage_ix, uint8_t *storage)
#define n
Definition: t4ht.c:1290
mrb_ast_node node
Definition: codegen.c:30
static BROTLI_INLINE uint32_t GetInsertBase(uint16_t inscode)
Definition: command.h:91
static BROTLI_INLINE uint32_t CommandDistanceContext(const Command *self)
Definition: command.h:167
static BROTLI_INLINE uint32_t CommandCopyLen(const Command *self)
Definition: command.h:176
static BROTLI_INLINE uint16_t GetInsertLengthCode(size_t insertlen)
Definition: command.h:32
static BROTLI_INLINE uint32_t GetCopyExtra(uint16_t copycode)
Definition: command.h:103
static BROTLI_INLINE uint32_t CommandCopyLenCode(const Command *self)
Definition: command.h:180
static BROTLI_INLINE uint32_t GetCopyBase(uint16_t copycode)
Definition: command.h:99
static BROTLI_INLINE uint32_t GetInsertExtra(uint16_t inscode)
Definition: command.h:95
static BROTLI_INLINE uint16_t GetCopyLengthCode(size_t copylen)
Definition: command.h:49
#define BROTLI_MAX_CONTEXT_MAP_SYMBOLS
Definition: constants.h:29
#define BROTLI_LITERAL_CONTEXT_BITS
Definition: constants.h:94
#define BROTLI_NUM_LITERAL_SYMBOLS
Definition: constants.h:26
#define BROTLI_DISTANCE_CONTEXT_BITS
Definition: constants.h:97
#define BROTLI_REPEAT_PREVIOUS_CODE_LENGTH
Definition: constants.h:34
#define BROTLI_REPEAT_ZERO_CODE_LENGTH
Definition: constants.h:35
#define BROTLI_NUM_COMMAND_SYMBOLS
Definition: constants.h:27
#define BROTLI_MAX_BLOCK_TYPE_SYMBOLS
Definition: constants.h:31
#define BROTLI_CODE_LENGTH_CODES
Definition: constants.h:36
#define BROTLI_NUM_BLOCK_LEN_SYMBOLS
Definition: constants.h:28
const uint8_t * ContextLut
Definition: context.h:105
#define BROTLI_CONTEXT_LUT(MODE)
Definition: context.h:108
ContextType
Definition: context.h:94
#define BROTLI_CONTEXT(P1, P2, LUT)
Definition: context.h:111
int params
Definition: definitions.c:42
int v
Definition: dviconv.c:10
const BrotliPrefixCodeRange _kBrotliPrefixCodeRanges[26]
Definition: constants.c:10
void BrotliCreateHuffmanTree(const uint32_t *data, const size_t length, const int tree_limit, HuffmanTree *tree, uint8_t *depth)
BROTLI_BOOL BrotliSetDepth(int p0, HuffmanTree *pool, uint8_t *depth, int max_depth)
void BrotliWriteHuffmanTree(const uint8_t *depth, size_t length, size_t *tree_size, uint8_t *tree, uint8_t *extra_bits_data)
void BrotliConvertBitDepthsToSymbols(const uint8_t *depth, size_t len, uint16_t *bits)
static BROTLI_INLINE void SortHuffmanTreeItems(HuffmanTree *items, const size_t n, HuffmanTreeComparator comparator)
static BROTLI_INLINE void InitHuffmanTree(HuffmanTree *self, uint32_t count, int16_t left, int16_t right)
static const uint8_t kStaticDistanceCodeDepth[64]
static const uint8_t kCodeLengthDepth[18]
static const uint16_t kStaticCommandCodeBits[BROTLI_NUM_COMMAND_SYMBOLS]
static const uint32_t kCodeLengthBits[18]
static const uint8_t kStaticCommandCodeDepth[BROTLI_NUM_COMMAND_SYMBOLS]
static const uint64_t kZeroRepsBits[BROTLI_NUM_COMMAND_SYMBOLS]
static const uint16_t kStaticDistanceCodeBits[64]
static const uint32_t kZeroRepsDepth[BROTLI_NUM_COMMAND_SYMBOLS]
static const uint32_t kNonZeroRepsDepth[BROTLI_NUM_COMMAND_SYMBOLS]
static BROTLI_INLINE void StoreStaticCommandHuffmanTree(size_t *storage_ix, uint8_t *storage)
static BROTLI_INLINE void StoreStaticDistanceHuffmanTree(size_t *storage_ix, uint8_t *storage)
static BROTLI_INLINE void StoreStaticCodeLengthCode(size_t *storage_ix, uint8_t *storage)
static const uint64_t kNonZeroRepsBits[BROTLI_NUM_COMMAND_SYMBOLS]
static BROTLI_INLINE uint32_t Log2FloorNonZero(size_t n)
Definition: fast_log.h:21
#define v0
#define v1
#define memcpy(d, s, n)
Definition: gsftopk.c:64
#define BROTLI_NUM_HISTOGRAM_DISTANCE_SYMBOLS
Definition: histogram.h:26
static int lengths[256]
Definition: iframe.c:174
register bit_buf_type register int int nbits
Definition: jdhuff.h:156
JBLOCKROW JDIMENSION num_blocks
Definition: jpegint.h:377
small capitals from c petite p scientific f u
Definition: afcover.h:88
small capitals from c petite p scientific i
Definition: afcover.h:80
@ right
Definition: annotate.c:15
signed short int16_t
Definition: stdint.h:76
unsigned short uint16_t
Definition: stdint.h:79
unsigned int uint32_t
Definition: stdint.h:80
unsigned char uint8_t
Definition: stdint.h:78
unsigned __int64 uint64_t
Definition: stdint.h:90
int num
Definition: disdvi.c:621
#define length(c)
Definition: ctangleboot.c:65
#define symbol(x)
Definition: web2c-parser.c:71
const int * pos
Definition: combiners.h:905
#define size_t
Definition: glob.c:257
#define BROTLI_ALLOC(M, T, N)
Definition: memory.h:44
#define BROTLI_FREE(M, P)
Definition: memory.h:48
#define BROTLI_IS_OOM(M)
Definition: memory.h:54
#define BROTLI_IS_NULL(A)
Definition: memory.h:68
#define cmd(arg)
Definition: mitsu.h:44
symbols
Definition: gen-def.py:18
union value value
Definition: obx.h:44
int k
Definition: otp-parser.c:70
unsigned start_pos
Definition: parse_ofm.c:60
#define index(s, c)
Definition: plain2.h:351
static char storage
Definition: pnmtosgi.c:48
bstring c int memset(void *s, int c, int length)
static uch dist_code[512]
Definition: pts_defl.c:2594
#define BROTLI_UINT32_MAX
Definition: types.h:59
#define TO_BROTLI_BOOL(X)
Definition: types.h:55
#define BROTLI_BOOL
Definition: types.h:49
#define mask(n)
Definition: lbitlib.c:93
#define sentinel
Definition: lib_package.c:437
lft_cell * left
Definition: routines.h:73
#define uint32_t
Definition: stdint.in.h:168
#define uint8_t
Definition: stdint.in.h:154
#define int16_t
Definition: stdint.in.h:160
BlockSplitCode block_split_code_
size_t histogram_length_
const uint8_t * block_types_
uint16_t * bits_
const uint32_t * block_lengths_
BlockTypeCodeCalculator type_code_calculator
uint16_t type_bits[BROTLI_MAX_BLOCK_TYPE_SYMBOLS]
uint8_t type_depths[BROTLI_MAX_BLOCK_TYPE_SYMBOLS]
uint16_t length_bits[BROTLI_NUM_BLOCK_LEN_SYMBOLS]
uint8_t length_depths[BROTLI_NUM_BLOCK_LEN_SYMBOLS]
size_t num_blocks
uint8_t * types
uint32_t * lengths
size_t num_types
uint32_t total_count_
uint32_t * distance_context_map
Definition: metablock.h:32
size_t literal_context_map_size
Definition: metablock.h:31
BlockSplit command_split
Definition: metablock.h:28
size_t distance_histograms_size
Definition: metablock.h:39
HistogramLiteral * literal_histograms
Definition: metablock.h:34
BlockSplit literal_split
Definition: metablock.h:27
size_t literal_histograms_size
Definition: metablock.h:35
uint32_t * literal_context_map
Definition: metablock.h:30
size_t distance_context_map_size
Definition: metablock.h:33
BlockSplit distance_split
Definition: metablock.h:29
HistogramDistance * distance_histograms
Definition: metablock.h:38
HistogramCommand * command_histograms
Definition: metablock.h:36
size_t command_histograms_size
Definition: metablock.h:37
Definition: namelist.c:170
Definition: inftrees.h:24
Definition: mendex.h:20
Definition: execute.c:108
Definition: object.c:319
int j
Definition: t4ht.c:1589
m
Definition: tex4ht.c:3990
return() int(((double) *(font_tbl[cur_fnt].wtbl+(int)(*(font_tbl[cur_fnt].char_wi+(int)(ch - font_tbl[cur_fnt].char_f)% 256)))/(double)(1L<< 20)) *(double) font_tbl[cur_fnt].scale)
#define BROTLI_SWAP(T, A, I, J)
Definition: platform.h:522
#define BROTLI_RESTRICT
Definition: platform.h:105
#define BROTLI_MAX(T, A, B)
Definition: platform.h:520
#define BROTLI_MIN(T, A, B)
Definition: platform.h:519
#define BROTLI_DCHECK(x)
Definition: platform.h:484
#define BROTLI_INLINE
Definition: platform.h:136
#define BROTLI_PREDICT_TRUE(x)
Definition: platform.h:86
#define s4
Definition: tokst.h:125
Definition: obx.h:51
static BROTLI_INLINE void BrotliWriteBitsPrepareStorage(size_t pos, uint8_t *array)
Definition: write_bits.h:76
static BROTLI_INLINE void BrotliWriteBits(size_t n_bits, uint64_t bits, size_t *BROTLI_RESTRICT pos, uint8_t *BROTLI_RESTRICT array)
Definition: write_bits.h:34