Home | History | Annotate | Download | only in enc
      1 /* Copyright 2017 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 #ifndef BROTLI_ENC_ENCODER_DICT_H_
      8 #define BROTLI_ENC_ENCODER_DICT_H_
      9 
     10 #include "../common/dictionary.h"
     11 #include "../common/platform.h"
     12 #include <brotli/types.h>
     13 #include "./static_dict_lut.h"
     14 
     15 #if defined(__cplusplus) || defined(c_plusplus)
     16 extern "C" {
     17 #endif
     18 
     19 /* Dictionary data (words and transforms) for 1 possible context */
     20 typedef struct BrotliEncoderDictionary {
     21   const BrotliDictionary* words;
     22 
     23   /* cut off for fast encoder */
     24   uint32_t cutoffTransformsCount;
     25   uint64_t cutoffTransforms;
     26 
     27   /* from dictionary_hash.h, for fast encoder */
     28   const uint16_t* hash_table;
     29 
     30   /* from static_dict_lut.h, for slow encoder */
     31   const uint16_t* buckets;
     32   const DictWord* dict_words;
     33 } BrotliEncoderDictionary;
     34 
     35 BROTLI_INTERNAL void BrotliInitEncoderDictionary(BrotliEncoderDictionary* dict);
     36 
     37 #if defined(__cplusplus) || defined(c_plusplus)
     38 }  /* extern "C" */
     39 #endif
     40 
     41 #endif  /* BROTLI_ENC_ENCODER_DICT_H_ */
     42