diff options
Diffstat (limited to 'c/common/shared_dictionary.c')
-rw-r--r-- | c/common/shared_dictionary.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/c/common/shared_dictionary.c b/c/common/shared_dictionary.c index 3ca40c0..49f1c9b 100644 --- a/c/common/shared_dictionary.c +++ b/c/common/shared_dictionary.c @@ -20,6 +20,8 @@ extern "C" { #endif +#if defined(BROTLI_EXPERIMENTAL) + #define BROTLI_NUM_ENCODED_LENGTHS (SHARED_BROTLI_MAX_DICTIONARY_WORD_LENGTH \ - SHARED_BROTLI_MIN_DICTIONARY_WORD_LENGTH + 1) @@ -442,6 +444,8 @@ static BROTLI_BOOL DecodeSharedDictionary( return ParseDictionary(encoded, size, dict); } +#endif /* BROTLI_EXPERIMENTAL */ + void BrotliSharedDictionaryDestroyInstance( BrotliSharedDictionary* dict) { if (!dict) { @@ -464,9 +468,12 @@ BROTLI_BOOL BrotliSharedDictionaryAttach( if (!dict) { return BROTLI_FALSE; } +#if defined(BROTLI_EXPERIMENTAL) if (type == BROTLI_SHARED_DICTIONARY_SERIALIZED) { return DecodeSharedDictionary(data, data_size, dict); - } else if (type == BROTLI_SHARED_DICTIONARY_RAW) { + } +#endif /* BROTLI_EXPERIMENTAL */ + if (type == BROTLI_SHARED_DICTIONARY_RAW) { if (dict->num_prefix >= SHARED_BROTLI_MAX_COMPOUND_DICTS) { return BROTLI_FALSE; } @@ -474,9 +481,8 @@ BROTLI_BOOL BrotliSharedDictionaryAttach( dict->prefix[dict->num_prefix] = data; dict->num_prefix++; return BROTLI_TRUE; - } else { - return BROTLI_FALSE; } + return BROTLI_FALSE; } BrotliSharedDictionary* BrotliSharedDictionaryCreateInstance( |