Index: third_party/brotli/enc/bit_cost.c |
diff --git a/third_party/brotli/enc/dictionary.h b/third_party/brotli/enc/bit_cost.c |
similarity index 26% |
rename from third_party/brotli/enc/dictionary.h |
rename to third_party/brotli/enc/bit_cost.c |
index c9c6362da8dc4c83706e16d8c0da4df9532300d8..01e30f6d5fff0e439e2b27e30c262f7afcffcf05 100644 |
--- a/third_party/brotli/enc/dictionary.h |
+++ b/third_party/brotli/enc/bit_cost.c |
@@ -4,38 +4,32 @@ |
See file LICENSE for detail or copy at https://opensource.org/licenses/MIT |
*/ |
-// Collection of static dictionary words. |
+/* Functions to estimate the bit cost of Huffman trees. */ |
-#ifndef BROTLI_ENC_DICTIONARY_H_ |
-#define BROTLI_ENC_DICTIONARY_H_ |
+#include "./bit_cost.h" |
-#include "./types.h" |
- |
-// No namespace, use same identifier as for the C decoder. |
+#include "../common/constants.h" |
+#include <brotli/types.h> |
+#include "./fast_log.h" |
+#include "./histogram.h" |
+#include "./port.h" |
#if defined(__cplusplus) || defined(c_plusplus) |
extern "C" { |
#endif |
-extern const uint8_t kBrotliDictionary[122784]; |
- |
-static const uint32_t kBrotliDictionaryOffsetsByLength[] = { |
- 0, 0, 0, 0, 0, 4096, 9216, 21504, 35840, 44032, |
- 53248, 63488, 74752, 87040, 93696, 100864, 104704, 106752, 108928, 113536, |
- 115968, 118528, 119872, 121280, 122016, |
-}; |
+#define FN(X) X ## Literal |
+#include "./bit_cost_inc.h" /* NOLINT(build/include) */ |
+#undef FN |
-static const uint8_t kBrotliDictionarySizeBitsByLength[] = { |
- 0, 0, 0, 0, 10, 10, 11, 11, 10, 10, |
- 10, 10, 10, 9, 9, 8, 7, 7, 8, 7, |
- 7, 6, 6, 5, 5, |
-}; |
+#define FN(X) X ## Command |
+#include "./bit_cost_inc.h" /* NOLINT(build/include) */ |
+#undef FN |
-static const int kBrotliMinDictionaryWordLength = 4; |
-static const int kBrotliMaxDictionaryWordLength = 24; |
+#define FN(X) X ## Distance |
+#include "./bit_cost_inc.h" /* NOLINT(build/include) */ |
+#undef FN |
#if defined(__cplusplus) || defined(c_plusplus) |
-} /* extern "C" */ |
+} /* extern "C" */ |
#endif |
- |
-#endif // BROTLI_ENC_DICTIONARY_H_ |