]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/C/BrotliCompress/enc/encoder_dict.h
BaseTools: Update Brotli Compress to the latest one 1.0.6
[mirror_edk2.git] / BaseTools / Source / C / BrotliCompress / enc / encoder_dict.h
diff --git a/BaseTools/Source/C/BrotliCompress/enc/encoder_dict.h b/BaseTools/Source/C/BrotliCompress/enc/encoder_dict.h
new file mode 100644 (file)
index 0000000..7c41ea0
--- /dev/null
@@ -0,0 +1,41 @@
+/* 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
+#ifndef BROTLI_ENC_ENCODER_DICT_H_\r
+#define BROTLI_ENC_ENCODER_DICT_H_\r
+\r
+#include "../common/dictionary.h"\r
+#include "../common/platform.h"\r
+#include <brotli/types.h>\r
+#include "./static_dict_lut.h"\r
+\r
+#if defined(__cplusplus) || defined(c_plusplus)\r
+extern "C" {\r
+#endif\r
+\r
+/* Dictionary data (words and transforms) for 1 possible context */\r
+typedef struct BrotliEncoderDictionary {\r
+  const BrotliDictionary* words;\r
+\r
+  /* cut off for fast encoder */\r
+  uint32_t cutoffTransformsCount;\r
+  uint64_t cutoffTransforms;\r
+\r
+  /* from dictionary_hash.h, for fast encoder */\r
+  const uint16_t* hash_table;\r
+\r
+  /* from static_dict_lut.h, for slow encoder */\r
+  const uint16_t* buckets;\r
+  const DictWord* dict_words;\r
+} BrotliEncoderDictionary;\r
+\r
+BROTLI_INTERNAL void BrotliInitEncoderDictionary(BrotliEncoderDictionary* dict);\r
+\r
+#if defined(__cplusplus) || defined(c_plusplus)\r
+}  /* extern "C" */\r
+#endif\r
+\r
+#endif  /* BROTLI_ENC_ENCODER_DICT_H_ */\r