diff options
author | Eugene Kliuchnikov <eustas.ru@gmail.com> | 2020-08-26 12:32:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-26 12:32:27 +0200 |
commit | 223d80cfbec8fd346e32906c732c8ede21f0cea6 (patch) | |
tree | de47f73fd7323e327cd9c9f20100da8ed4e13f54 /c/enc/command.c | |
parent | 0c5603e07bed1d5fbb45e38f9bdf0e4560fde3f0 (diff) | |
download | brotli-223d80cfbec8fd346e32906c732c8ede21f0cea6.zip brotli-223d80cfbec8fd346e32906c732c8ede21f0cea6.tar.gz brotli-223d80cfbec8fd346e32906c732c8ede21f0cea6.tar.bz2 |
Update (#826)
* IMPORTANT: decoder: fix potential overflow when input chunk is >2GiB
* simplify max Huffman table size calculation
* eliminate symbol duplicates (static arrays in .h files)
* minor combing in research/ code
Diffstat (limited to 'c/enc/command.c')
-rw-r--r-- | c/enc/command.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/c/enc/command.c b/c/enc/command.c new file mode 100644 index 0000000..5e6c249 --- /dev/null +++ b/c/enc/command.c @@ -0,0 +1,28 @@ +/* Copyright 2013 Google Inc. All Rights Reserved. + + Distributed under MIT license. + See file LICENSE for detail or copy at https://opensource.org/licenses/MIT +*/ + +#include "./command.h" + +#include <brotli/types.h> + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +const uint32_t kBrotliInsBase[BROTLI_NUM_INS_COPY_CODES] = { + 0, 1, 2, 3, 4, 5, 6, 8, 10, 14, 18, 26, + 34, 50, 66, 98, 130, 194, 322, 578, 1090, 2114, 6210, 22594}; +const uint32_t kBrotliInsExtra[BROTLI_NUM_INS_COPY_CODES] = { + 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 7, 8, 9, 10, 12, 14, 24}; +const uint32_t kBrotliCopyBase[BROTLI_NUM_INS_COPY_CODES] = { + 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 18, + 22, 30, 38, 54, 70, 102, 134, 198, 326, 582, 1094, 2118}; +const uint32_t kBrotliCopyExtra[BROTLI_NUM_INS_COPY_CODES] = { + 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 7, 8, 9, 10, 24}; + +#if defined(__cplusplus) || defined(c_plusplus) +} /* extern "C" */ +#endif |