Debian Codegraph @

c/dec/prefix.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 /* Lookup tables to map prefix codes to value ranges. This is used during
8 decoding of the block lengths, literal insertion lengths and copy lengths. */
9
10 #ifndef BROTLI_DEC_PREFIX_H_
11 #define BROTLI_DEC_PREFIX_H_
12
13 #include "../common/constants.h"
14 #include "../common/platform.h" /* IWYU pragma: keep */
15 #include "../common/static_init.h"
16
17 #if defined(__cplusplus) || defined(c_plusplus)
18 extern "C" {
19 #endif
20
21 typedef struct CmdLutElement {
22 uint8_t insert_len_extra_bits;
23 uint8_t copy_len_extra_bits;
24 int8_t distance_code;
25 uint8_t context;
26 uint16_t insert_len_offset;
27 uint16_t copy_len_offset;
28 } CmdLutElement;
29
30 #if (BROTLI_STATIC_INIT == BROTLI_STATIC_INIT_NONE)
31 BROTLI_INTERNAL extern const BROTLI_MODEL("small")
32 CmdLutElement kCmdLut[BROTLI_NUM_COMMAND_SYMBOLS];
33 #else
34 BROTLI_INTERNAL BROTLI_BOOL BrotliDecoderInitCmdLut(CmdLutElement* items);
35 BROTLI_INTERNAL extern BROTLI_MODEL("small")
36 CmdLutElement kCmdLut[BROTLI_NUM_COMMAND_SYMBOLS];
37 #endif
38
39 #if defined(__cplusplus) || defined(c_plusplus)
40 } /* extern "C" */
41 #endif
42
43 #endif /* BROTLI_DEC_PREFIX_H_ */