diff options
author | Matt A. Tobin <email@mattatobin.com> | 2019-11-14 21:08:43 -0500 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2019-11-14 21:08:43 -0500 |
commit | 1d30f6fa8413746ddc408f93710d701493af273d (patch) | |
tree | abe84e83d704e13c60c90db7ac4b9e363d8a81fc /modules/brotli/dec/prefix.h | |
parent | 9308ec68e863e4c6e650680370a5d7baa9f0d1f3 (diff) | |
parent | 00573571a226a0c59dd744da67483864a22911aa (diff) | |
download | UXP-1d30f6fa8413746ddc408f93710d701493af273d.tar UXP-1d30f6fa8413746ddc408f93710d701493af273d.tar.gz UXP-1d30f6fa8413746ddc408f93710d701493af273d.tar.lz UXP-1d30f6fa8413746ddc408f93710d701493af273d.tar.xz UXP-1d30f6fa8413746ddc408f93710d701493af273d.zip |
Merge branch 'master' into mailnews-work
Diffstat (limited to 'modules/brotli/dec/prefix.h')
-rw-r--r-- | modules/brotli/dec/prefix.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/modules/brotli/dec/prefix.h b/modules/brotli/dec/prefix.h index eaae37f02..3ea062d84 100644 --- a/modules/brotli/dec/prefix.h +++ b/modules/brotli/dec/prefix.h @@ -5,22 +5,23 @@ */ /* Lookup tables to map prefix codes to value ranges. This is used during - decoding of the block lengths, literal insertion lengths and copy lengths. -*/ + decoding of the block lengths, literal insertion lengths and copy lengths. */ #ifndef BROTLI_DEC_PREFIX_H_ #define BROTLI_DEC_PREFIX_H_ -#include "./types.h" +#include "../common/constants.h" +#include <brotli/types.h> -/* Represents the range of values belonging to a prefix code: */ -/* [offset, offset + 2^nbits) */ +/* Represents the range of values belonging to a prefix code: + [offset, offset + 2^nbits) */ struct PrefixCodeRange { uint16_t offset; uint8_t nbits; }; -static const struct PrefixCodeRange kBlockLengthPrefixCode[] = { +static const struct PrefixCodeRange + kBlockLengthPrefixCode[BROTLI_NUM_BLOCK_LEN_SYMBOLS] = { { 1, 2}, { 5, 2}, { 9, 2}, { 13, 2}, { 17, 3}, { 25, 3}, { 33, 3}, { 41, 3}, { 49, 4}, { 65, 4}, { 81, 4}, { 97, 4}, @@ -39,7 +40,7 @@ typedef struct CmdLutElement { uint16_t copy_len_offset; } CmdLutElement; -static const CmdLutElement kCmdLut[704] = { +static const CmdLutElement kCmdLut[BROTLI_NUM_COMMAND_SYMBOLS] = { { 0x00, 0x00, 0, 0x00, 0x0000, 0x0002 }, { 0x00, 0x00, 0, 0x01, 0x0000, 0x0003 }, { 0x00, 0x00, 0, 0x02, 0x0000, 0x0004 }, |