]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/C/BrotliCompress/enc/encoder_dict.c
BaseTools: Update Brotli Compress to the latest one 1.0.6
[mirror_edk2.git] / BaseTools / Source / C / BrotliCompress / enc / encoder_dict.c
diff --git a/BaseTools/Source/C/BrotliCompress/enc/encoder_dict.c b/BaseTools/Source/C/BrotliCompress/enc/encoder_dict.c
new file mode 100644 (file)
index 0000000..956d50c
--- /dev/null
@@ -0,0 +1,32 @@
+/* Copyright 2017 Google Inc. All Rights Reserved.\r
+\r
+   Distributed under MIT license.\r
+   See file LICENSE for detail or copy at https://opensource.org/licenses/MIT\r
+*/\r
+\r
+#include "./encoder_dict.h"\r
+\r
+#include "../common/dictionary.h"\r
+#include "../common/transform.h"\r
+#include "./dictionary_hash.h"\r
+#include "./hash.h"\r
+\r
+#if defined(__cplusplus) || defined(c_plusplus)\r
+extern "C" {\r
+#endif\r
+\r
+void BrotliInitEncoderDictionary(BrotliEncoderDictionary* dict) {\r
+  dict->words = BrotliGetDictionary();\r
+\r
+  dict->hash_table = kStaticDictionaryHash;\r
+  dict->buckets = kStaticDictionaryBuckets;\r
+  dict->dict_words = kStaticDictionaryWords;\r
+\r
+  dict->cutoffTransformsCount = kCutoffTransformsCount;\r
+  dict->cutoffTransforms = kCutoffTransforms;\r
+\r
+}\r
+\r
+#if defined(__cplusplus) || defined(c_plusplus)\r
+}  /* extern "C" */\r
+#endif\r