11cb0ef41Sopenharmony_ci/* Copyright 2017 Google Inc. All Rights Reserved. 21cb0ef41Sopenharmony_ci 31cb0ef41Sopenharmony_ci Distributed under MIT license. 41cb0ef41Sopenharmony_ci See file LICENSE for detail or copy at https://opensource.org/licenses/MIT 51cb0ef41Sopenharmony_ci*/ 61cb0ef41Sopenharmony_ci 71cb0ef41Sopenharmony_ci#include "./encoder_dict.h" 81cb0ef41Sopenharmony_ci 91cb0ef41Sopenharmony_ci#include "../common/dictionary.h" 101cb0ef41Sopenharmony_ci#include "../common/transform.h" 111cb0ef41Sopenharmony_ci#include "./dictionary_hash.h" 121cb0ef41Sopenharmony_ci#include "./hash.h" 131cb0ef41Sopenharmony_ci 141cb0ef41Sopenharmony_ci#if defined(__cplusplus) || defined(c_plusplus) 151cb0ef41Sopenharmony_ciextern "C" { 161cb0ef41Sopenharmony_ci#endif 171cb0ef41Sopenharmony_ci 181cb0ef41Sopenharmony_civoid BrotliInitEncoderDictionary(BrotliEncoderDictionary* dict) { 191cb0ef41Sopenharmony_ci dict->words = BrotliGetDictionary(); 201cb0ef41Sopenharmony_ci dict->num_transforms = (uint32_t)BrotliGetTransforms()->num_transforms; 211cb0ef41Sopenharmony_ci 221cb0ef41Sopenharmony_ci dict->hash_table_words = kStaticDictionaryHashWords; 231cb0ef41Sopenharmony_ci dict->hash_table_lengths = kStaticDictionaryHashLengths; 241cb0ef41Sopenharmony_ci dict->buckets = kStaticDictionaryBuckets; 251cb0ef41Sopenharmony_ci dict->dict_words = kStaticDictionaryWords; 261cb0ef41Sopenharmony_ci 271cb0ef41Sopenharmony_ci dict->cutoffTransformsCount = kCutoffTransformsCount; 281cb0ef41Sopenharmony_ci dict->cutoffTransforms = kCutoffTransforms; 291cb0ef41Sopenharmony_ci} 301cb0ef41Sopenharmony_ci 311cb0ef41Sopenharmony_ci#if defined(__cplusplus) || defined(c_plusplus) 321cb0ef41Sopenharmony_ci} /* extern "C" */ 331cb0ef41Sopenharmony_ci#endif 34