Debian Codegraph @

c/common/dictionary.h

raw symbols SCIP
1 /* Copyright 2013 Google Inc. All Rights Reserved.
2
3 Distributed under MIT license.
4 See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
5 */
6
7 /* Collection of static dictionary words. */
8
9 #ifndef BROTLI_COMMON_DICTIONARY_H_
10 #define BROTLI_COMMON_DICTIONARY_H_cxx . . $ `c/common/dictionary.h:10:9`!
11
12 #include "platform.h"cxx . . $ `<file>/c/common/platform.h`/
13
14 #if defined(__cplusplus) || defined(c_plusplus)
15 extern "C" {
16 #endif
17
18 typedef struct BrotliDictionarycxx . . $ BrotliDictionary# {
19 /**
20 * Number of bits to encode index of dictionary word in a bucket.
21 *
22 * Specification: Appendix A. Static Dictionary Data
23 *
24 * Words in a dictionary are bucketed by length.
25 * @c 0 means that there are no words of a given length.
26 * Dictionary consists of words with length of [4..24] bytes.
27 * Values at [0..3] and [25..31] indices should not be addressed.
28 */
29 uint8_tcxx . . $ uint8_t# size_bits_by_lengthcxx . . $ BrotliDictionary#size_bits_by_length.[32];
30
31 /* assert(offset[i + 1] == offset[i] + (bits[i] ? (i << bits[i]) : 0)) */
32 uint32_tcxx . . $ uint32_t# offsets_by_lengthcxx . . $ BrotliDictionary#offsets_by_length.[32];
33
34 /* assert(data_size == offsets_by_length[31]) */
35 size_t data_sizecxx . . $ BrotliDictionary#data_size.;
36
37 /* Data array is not bound, and should obey to size_bits_by_length values.
38 Specified size matches default (RFC 7932) dictionary. Its size is
39 defined by data_size */
40 const uint8_tcxx . . $ uint8_t#* datacxx . . $ BrotliDictionary#data.;
41 } BrotliDictionarycxx . . $ BrotliDictionary#;
42
43 BROTLI_COMMON_APIcxx . . $ `c/include/brotli/port.h:286:9`! const BrotliDictionarycxx . . $ BrotliDictionary#* BrotliGetDictionarycxx . . $ BrotliGetDictionary(9696b0b52f475b5a).(void);
44
45 /**
46 * Sets dictionary data.
47 *
48 * When dictionary data is already set / present, this method is no-op.
49 *
50 * Dictionary data MUST be provided before BrotliGetDictionary is invoked.
51 * This method is used ONLY in multi-client environment (e.g. C + Java),
52 * to reduce storage by sharing single dictionary between implementations.
53 */
54 BROTLI_COMMON_APIcxx . . $ `c/include/brotli/port.h:286:9`! void BrotliSetDictionaryDatacxx . . $ BrotliSetDictionaryData(28caea9380bfac8a).(const uint8_tcxx . . $ uint8_t#* data);
55
56 #define BROTLI_MIN_DICTIONARY_WORD_LENGTHcxx . . $ `c/common/dictionary.h:56:9`! 4
57 #define BROTLI_MAX_DICTIONARY_WORD_LENGTHcxx . . $ `c/common/dictionary.h:57:9`! 24
58
59 #if defined(__cplusplus) || defined(c_plusplus)
60 } /* extern "C" */
61 #endif
62
63 #endif /* BROTLI_COMMON_DICTIONARY_H_ */