| 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_cxx . . $ `c/dec/prefix.h:11:9`! |
| 12 | |
| 13 | #include "../common/constants.h"cxx . . $ `<file>/c/common/constants.h`/ |
| 14 | #include "../common/platform.h"cxx . . $ `<file>/c/common/platform.h`/ /* IWYU pragma: keep */ |
| 15 | #include "../common/static_init.h"cxx . . $ `<file>/c/common/static_init.h`/ |
| 16 | |
| 17 | #if defined(__cplusplus) || defined(c_plusplus) |
| 18 | extern "C" { |
| 19 | #endif |
| 20 | |
| 21 | typedef struct CmdLutElementcxx . . $ CmdLutElement# { |
| 22 | uint8_tcxx . . $ uint8_t# insert_len_extra_bitscxx . . $ CmdLutElement#insert_len_extra_bits.; |
| 23 | uint8_tcxx . . $ uint8_t# copy_len_extra_bitscxx . . $ CmdLutElement#copy_len_extra_bits.; |
| 24 | int8_tcxx . . $ int8_t# distance_codecxx . . $ CmdLutElement#distance_code.; |
| 25 | uint8_tcxx . . $ uint8_t# contextcxx . . $ CmdLutElement#context.; |
| 26 | uint16_tcxx . . $ uint16_t# insert_len_offsetcxx . . $ CmdLutElement#insert_len_offset.; |
| 27 | uint16_tcxx . . $ uint16_t# copy_len_offsetcxx . . $ CmdLutElement#copy_len_offset.; |
| 28 | } CmdLutElementcxx . . $ CmdLutElement#; |
| 29 | |
| 30 | #if (BROTLI_STATIC_INITcxx . . $ `c/common/static_init.h:37:9`! == BROTLI_STATIC_INIT_NONEcxx . . $ `c/common/static_init.h:28:9`!) |
| 31 | BROTLI_INTERNALcxx . . $ `c/include/brotli/port.h:252:9`! extern const BROTLI_MODELcxx . . $ `c/common/platform.h:674:9`!("small") |
| 32 | CmdLutElementcxx . . $ CmdLutElement# kCmdLutcxx . . $ kCmdLut.[BROTLI_NUM_COMMAND_SYMBOLScxx . . $ `c/common/constants.h:25:9`!]; |
| 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_ */ |