aboutsummaryrefslogtreecommitdiff
path: root/c/enc/encoder_dict.h
diff options
context:
space:
mode:
authorEvgenii Kliuchnikov <eustas@google.com>2023-08-18 02:55:01 -0700
committerCopybara-Service <copybara-worker@google.com>2023-08-18 02:55:33 -0700
commit3ebb2d30ab221abdc235cad602fc5c97c9de5b33 (patch)
treedd74f7411e5e262136bd9401e5382ab3570ffb3b /c/enc/encoder_dict.h
parent0f2157cc5e7f6a28bf648738c208ca825917589a (diff)
downloadbrotli-3ebb2d30ab221abdc235cad602fc5c97c9de5b33.zip
brotli-3ebb2d30ab221abdc235cad602fc5c97c9de5b33.tar.gz
brotli-3ebb2d30ab221abdc235cad602fc5c97c9de5b33.tar.bz2
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
Diffstat (limited to 'c/enc/encoder_dict.h')
-rw-r--r--c/enc/encoder_dict.h5
1 files changed, 5 insertions, 0 deletions
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);