From 3ebb2d30ab221abdc235cad602fc5c97c9de5b33 Mon Sep 17 00:00:00 2001 From: Evgenii Kliuchnikov Date: Fri, 18 Aug 2023 02:55:01 -0700 Subject: Move serialized dictionary feature behind the flag. BROTLI_SHARED_DICTIONARY_SERIALIZED enum value is a part of API, but it should not be used (will cause failures). Changing how serialized dictionaries work won't be considered as an API change, until this feature is enabled. Enabling this feature in the future will be considered as a "compatible" change. PiperOrigin-RevId: 558091676 --- c/enc/encoder_dict.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'c/enc/encoder_dict.h') diff --git a/c/enc/encoder_dict.h b/c/enc/encoder_dict.h index b291f98..27dcbcd 100644 --- a/c/enc/encoder_dict.h +++ b/c/enc/encoder_dict.h @@ -52,8 +52,11 @@ typedef struct BrotliTrie { BrotliTrieNode root; } BrotliTrie; +#if defined(BROTLI_EXPERIMENTAL) BROTLI_INTERNAL const BrotliTrieNode* BrotliTrieSub(const BrotliTrie* trie, const BrotliTrieNode* node, uint8_t c); +#endif /* BROTLI_EXPERIMENTAL */ + /* Dictionary data (words and transforms) for 1 possible context */ typedef struct BrotliEncoderDictionary { const BrotliDictionary* words; @@ -129,12 +132,14 @@ typedef struct ManagedDictionary { BROTLI_INTERNAL void BrotliInitSharedEncoderDictionary( SharedEncoderDictionary* dict); +#if defined(BROTLI_EXPERIMENTAL) /* Initializes to shared dictionary that will be parsed from encoded_dict. Requires that you keep the encoded_dict buffer around, parts of data will point to it. */ BROTLI_INTERNAL BROTLI_BOOL BrotliInitCustomSharedEncoderDictionary( MemoryManager* m, const uint8_t* encoded_dict, size_t size, int quality, SharedEncoderDictionary* dict); +#endif /* BROTLI_EXPERIMENTAL */ BROTLI_INTERNAL void BrotliCleanupSharedEncoderDictionary( MemoryManager* m, SharedEncoderDictionary* dict); -- cgit v1.1