]>
Commit | Line | Data |
---|---|---|
dd4f667e LG |
1 | /* Copyright 2017 Google Inc. All Rights Reserved.\r |
2 | \r | |
3 | Distributed under MIT license.\r | |
4 | See file LICENSE for detail or copy at https://opensource.org/licenses/MIT\r | |
5 | */\r | |
6 | \r | |
7 | #ifndef BROTLI_ENC_ENCODER_DICT_H_\r | |
8 | #define BROTLI_ENC_ENCODER_DICT_H_\r | |
9 | \r | |
10 | #include "../common/dictionary.h"\r | |
11 | #include "../common/platform.h"\r | |
12 | #include <brotli/types.h>\r | |
13 | #include "./static_dict_lut.h"\r | |
14 | \r | |
15 | #if defined(__cplusplus) || defined(c_plusplus)\r | |
16 | extern "C" {\r | |
17 | #endif\r | |
18 | \r | |
19 | /* Dictionary data (words and transforms) for 1 possible context */\r | |
20 | typedef struct BrotliEncoderDictionary {\r | |
21 | const BrotliDictionary* words;\r | |
22 | \r | |
23 | /* cut off for fast encoder */\r | |
24 | uint32_t cutoffTransformsCount;\r | |
25 | uint64_t cutoffTransforms;\r | |
26 | \r | |
27 | /* from dictionary_hash.h, for fast encoder */\r | |
28 | const uint16_t* hash_table;\r | |
29 | \r | |
30 | /* from static_dict_lut.h, for slow encoder */\r | |
31 | const uint16_t* buckets;\r | |
32 | const DictWord* dict_words;\r | |
33 | } BrotliEncoderDictionary;\r | |
34 | \r | |
35 | BROTLI_INTERNAL void BrotliInitEncoderDictionary(BrotliEncoderDictionary* dict);\r | |
36 | \r | |
37 | #if defined(__cplusplus) || defined(c_plusplus)\r | |
38 | } /* extern "C" */\r | |
39 | #endif\r | |
40 | \r | |
41 | #endif /* BROTLI_ENC_ENCODER_DICT_H_ */\r |