Commit | Line | Data |
---|---|---|
f9995f31 MG |
1 | /* Copyright 2013 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 | /* Collection of static dictionary words. */ | |
8 | ||
9 | #ifndef BROTLI_DEC_DICTIONARY_H_ | |
10 | #define BROTLI_DEC_DICTIONARY_H_ | |
11 | ||
12 | #include "./types.h" | |
13 | ||
14 | #if defined(__cplusplus) || defined(c_plusplus) | |
15 | extern "C" { | |
16 | #endif | |
17 | ||
18 | extern const uint8_t kBrotliDictionary[122784]; | |
19 | ||
20 | static const int kBrotliDictionaryOffsetsByLength[] = { | |
21 | 0, 0, 0, 0, 0, 4096, 9216, 21504, 35840, 44032, | |
22 | 53248, 63488, 74752, 87040, 93696, 100864, 104704, 106752, 108928, 113536, | |
23 | 115968, 118528, 119872, 121280, 122016, | |
24 | }; | |
25 | ||
26 | static const uint8_t kBrotliDictionarySizeBitsByLength[] = { | |
27 | 0, 0, 0, 0, 10, 10, 11, 11, 10, 10, | |
28 | 10, 10, 10, 9, 9, 8, 7, 7, 8, 7, | |
29 | 7, 6, 6, 5, 5, | |
30 | }; | |
31 | ||
32 | static const int kBrotliMinDictionaryWordLength = 4; | |
33 | static const int kBrotliMaxDictionaryWordLength = 24; | |
34 | ||
35 | #if defined(__cplusplus) || defined(c_plusplus) | |
36 | } /* extern "C" */ | |
37 | #endif | |
38 | ||
39 | #endif /* BROTLI_DEC_DICTIONARY_H_ */ |