• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 #include "./encoder_dict.h"
8 
9 #include "../common/dictionary.h"
10 #include "../common/transform.h"
11 #include "./dictionary_hash.h"
12 #include "./hash.h"
13 
14 #if defined(__cplusplus) || defined(c_plusplus)
15 extern "C" {
16 #endif
17 
BrotliInitEncoderDictionary(BrotliEncoderDictionary * dict)18 void BrotliInitEncoderDictionary(BrotliEncoderDictionary* dict) {
19   dict->words = BrotliGetDictionary();
20   dict->num_transforms = (uint32_t)BrotliGetTransforms()->num_transforms;
21 
22   dict->hash_table_words = kStaticDictionaryHashWords;
23   dict->hash_table_lengths = kStaticDictionaryHashLengths;
24   dict->buckets = kStaticDictionaryBuckets;
25   dict->dict_words = kStaticDictionaryWords;
26 
27   dict->cutoffTransformsCount = kCutoffTransformsCount;
28   dict->cutoffTransforms = kCutoffTransforms;
29 }
30 
31 #if defined(__cplusplus) || defined(c_plusplus)
32 }  /* extern "C" */
33 #endif
34