Debian Codegraph @

c/dec/state.h

raw symbols SCIP
1 /* Copyright 2015 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 /* Brotli state for partial streaming decoding. */
8
9 #ifndef BROTLI_DEC_STATE_H_
10 #define BROTLI_DEC_STATE_H_cxx . . $ `c/dec/state.h:10:9`!
11
12 #include "../common/constants.h"cxx . . $ `<file>/c/common/constants.h`/
13 #include "../common/platform.h"cxx . . $ `<file>/c/common/platform.h`/
14 #include <brotli/shared_dictionary.h>cxx . . $ `<file>/c/include/brotli/shared_dictionary.h`/
15 #include <brotli/decode.h>cxx . . $ `<file>/c/include/brotli/decode.h`/
16 #include "bit_reader.h"cxx . . $ `<file>/c/dec/bit_reader.h`/
17 #include "huffman.h"cxx . . $ `<file>/c/dec/huffman.h`/
18
19 #if defined(__cplusplus) || defined(c_plusplus)
20 extern "C" {
21 #endif
22
23 /* Graphviz diagram that describes state transitions:
24
25 digraph States {
26 graph [compound=true]
27 concentrate=true
28 node [shape="box"]
29
30 UNINITED -> {LARGE_WINDOW_BITS -> INITIALIZE}
31 subgraph cluster_metablock_workflow {
32 style="rounded"
33 label=< <B>METABLOCK CYCLE</B> >
34 METABLOCK_BEGIN -> METABLOCK_HEADER
35 METABLOCK_HEADER:sw -> METADATA
36 METABLOCK_HEADER:s -> UNCOMPRESSED
37 METABLOCK_HEADER:se -> METABLOCK_DONE:ne
38 METADATA:s -> METABLOCK_DONE:w
39 UNCOMPRESSED:s -> METABLOCK_DONE:n
40 METABLOCK_DONE:e -> METABLOCK_BEGIN:e [constraint="false"]
41 }
42 INITIALIZE -> METABLOCK_BEGIN
43 METABLOCK_DONE -> DONE
44
45 subgraph cluster_compressed_metablock {
46 style="rounded"
47 label=< <B>COMPRESSED METABLOCK</B> >
48
49 subgraph cluster_command {
50 style="rounded"
51 label=< <B>HOT LOOP</B> >
52
53 _METABLOCK_DONE_PORT_ [shape=point style=invis]
54
55 {
56 // Set different shape for nodes returning from "compressed metablock".
57 node [shape=invhouse]; CMD_INNER CMD_POST_DECODE_LITERALS;
58 CMD_POST_WRAP_COPY; CMD_INNER_WRITE; CMD_POST_WRITE_1;
59 }
60
61 CMD_BEGIN -> CMD_INNER -> CMD_POST_DECODE_LITERALS -> CMD_POST_WRAP_COPY
62
63 // IO ("write") nodes are not in the hot loop!
64 CMD_INNER_WRITE [style=dashed]
65 CMD_INNER -> CMD_INNER_WRITE
66 CMD_POST_WRITE_1 [style=dashed]
67 CMD_POST_DECODE_LITERALS -> CMD_POST_WRITE_1
68 CMD_POST_WRITE_2 [style=dashed]
69 CMD_POST_WRAP_COPY -> CMD_POST_WRITE_2
70
71 CMD_POST_WRITE_1 -> CMD_BEGIN:s [constraint="false"]
72 CMD_INNER_WRITE -> {CMD_INNER CMD_POST_DECODE_LITERALS}
73 [constraint="false"]
74 CMD_BEGIN:ne -> CMD_POST_DECODE_LITERALS [constraint="false"]
75 CMD_POST_WRAP_COPY -> CMD_BEGIN [constraint="false"]
76 CMD_POST_DECODE_LITERALS -> CMD_BEGIN:ne [constraint="false"]
77 CMD_POST_WRITE_2 -> CMD_POST_WRAP_COPY [constraint="false"]
78 {rank=same; CMD_BEGIN; CMD_INNER; CMD_POST_DECODE_LITERALS;
79 CMD_POST_WRAP_COPY}
80 {rank=same; CMD_INNER_WRITE; CMD_POST_WRITE_1; CMD_POST_WRITE_2}
81
82 {CMD_INNER CMD_POST_DECODE_LITERALS CMD_POST_WRAP_COPY} ->
83 _METABLOCK_DONE_PORT_ [style=invis]
84 {CMD_INNER_WRITE CMD_POST_WRITE_1} -> _METABLOCK_DONE_PORT_
85 [constraint="false" style=invis]
86 }
87
88 BEFORE_COMPRESSED_METABLOCK_HEADER:s -> HUFFMAN_CODE_0:n
89 HUFFMAN_CODE_0 -> HUFFMAN_CODE_1 -> HUFFMAN_CODE_2 -> HUFFMAN_CODE_3
90 HUFFMAN_CODE_0 -> METABLOCK_HEADER_2 -> CONTEXT_MODES -> CONTEXT_MAP_1
91 CONTEXT_MAP_1 -> CONTEXT_MAP_2 -> TREE_GROUP
92 TREE_GROUP -> BEFORE_COMPRESSED_METABLOCK_BODY:e
93 BEFORE_COMPRESSED_METABLOCK_BODY:s -> CMD_BEGIN:n
94
95 HUFFMAN_CODE_3:e -> HUFFMAN_CODE_0:ne [constraint="false"]
96 {rank=same; HUFFMAN_CODE_0; HUFFMAN_CODE_1; HUFFMAN_CODE_2; HUFFMAN_CODE_3}
97 {rank=same; METABLOCK_HEADER_2; CONTEXT_MODES; CONTEXT_MAP_1; CONTEXT_MAP_2;
98 TREE_GROUP}
99 }
100 METABLOCK_HEADER:e -> BEFORE_COMPRESSED_METABLOCK_HEADER:n
101
102 _METABLOCK_DONE_PORT_ -> METABLOCK_DONE:se
103 [constraint="false" ltail=cluster_command]
104
105 UNINITED [shape=Mdiamond];
106 DONE [shape=Msquare];
107 }
108
109
110 */
111
112 typedef enumcxx . . $ $anonymous_type_8d5a752e512a1f79_0# {
113 BROTLI_STATE_UNINITEDcxx . . $ BROTLI_STATE_UNINITED.,
114 BROTLI_STATE_LARGE_WINDOW_BITScxx . . $ BROTLI_STATE_LARGE_WINDOW_BITS.,
115 BROTLI_STATE_INITIALIZEcxx . . $ BROTLI_STATE_INITIALIZE.,
116 BROTLI_STATE_METABLOCK_BEGINcxx . . $ BROTLI_STATE_METABLOCK_BEGIN.,
117 BROTLI_STATE_METABLOCK_HEADERcxx . . $ BROTLI_STATE_METABLOCK_HEADER.,
118 BROTLI_STATE_METABLOCK_HEADER_2cxx . . $ BROTLI_STATE_METABLOCK_HEADER_2.,
119 BROTLI_STATE_CONTEXT_MODEScxx . . $ BROTLI_STATE_CONTEXT_MODES.,
120 BROTLI_STATE_COMMAND_BEGINcxx . . $ BROTLI_STATE_COMMAND_BEGIN.,
121 BROTLI_STATE_COMMAND_INNERcxx . . $ BROTLI_STATE_COMMAND_INNER.,
122 BROTLI_STATE_COMMAND_POST_DECODE_LITERALScxx . . $ BROTLI_STATE_COMMAND_POST_DECODE_LITERALS.,
123 BROTLI_STATE_COMMAND_POST_WRAP_COPYcxx . . $ BROTLI_STATE_COMMAND_POST_WRAP_COPY.,
124 BROTLI_STATE_UNCOMPRESSEDcxx . . $ BROTLI_STATE_UNCOMPRESSED.,
125 BROTLI_STATE_METADATAcxx . . $ BROTLI_STATE_METADATA.,
126 BROTLI_STATE_COMMAND_INNER_WRITEcxx . . $ BROTLI_STATE_COMMAND_INNER_WRITE.,
127 BROTLI_STATE_METABLOCK_DONEcxx . . $ BROTLI_STATE_METABLOCK_DONE.,
128 BROTLI_STATE_COMMAND_POST_WRITE_1cxx . . $ BROTLI_STATE_COMMAND_POST_WRITE_1.,
129 BROTLI_STATE_COMMAND_POST_WRITE_2cxx . . $ BROTLI_STATE_COMMAND_POST_WRITE_2.,
130 BROTLI_STATE_BEFORE_COMPRESSED_METABLOCK_HEADERcxx . . $ BROTLI_STATE_BEFORE_COMPRESSED_METABLOCK_HEADER.,
131 BROTLI_STATE_HUFFMAN_CODE_0cxx . . $ BROTLI_STATE_HUFFMAN_CODE_0.,
132 BROTLI_STATE_HUFFMAN_CODE_1cxx . . $ BROTLI_STATE_HUFFMAN_CODE_1.,
133 BROTLI_STATE_HUFFMAN_CODE_2cxx . . $ BROTLI_STATE_HUFFMAN_CODE_2.,
134 BROTLI_STATE_HUFFMAN_CODE_3cxx . . $ BROTLI_STATE_HUFFMAN_CODE_3.,
135 BROTLI_STATE_CONTEXT_MAP_1cxx . . $ BROTLI_STATE_CONTEXT_MAP_1.,
136 BROTLI_STATE_CONTEXT_MAP_2cxx . . $ BROTLI_STATE_CONTEXT_MAP_2.,
137 BROTLI_STATE_TREE_GROUPcxx . . $ BROTLI_STATE_TREE_GROUP.,
138 BROTLI_STATE_BEFORE_COMPRESSED_METABLOCK_BODYcxx . . $ BROTLI_STATE_BEFORE_COMPRESSED_METABLOCK_BODY.,
139 BROTLI_STATE_DONEcxx . . $ BROTLI_STATE_DONE.
140 } BrotliRunningStatecxx . . $ BrotliRunningState#;
141
142 typedef enumcxx . . $ $anonymous_type_8d5a752e512a1f79_1# {
143 BROTLI_STATE_METABLOCK_HEADER_NONEcxx . . $ BROTLI_STATE_METABLOCK_HEADER_NONE.,
144 BROTLI_STATE_METABLOCK_HEADER_EMPTYcxx . . $ BROTLI_STATE_METABLOCK_HEADER_EMPTY.,
145 BROTLI_STATE_METABLOCK_HEADER_NIBBLEScxx . . $ BROTLI_STATE_METABLOCK_HEADER_NIBBLES.,
146 BROTLI_STATE_METABLOCK_HEADER_SIZEcxx . . $ BROTLI_STATE_METABLOCK_HEADER_SIZE.,
147 BROTLI_STATE_METABLOCK_HEADER_UNCOMPRESSEDcxx . . $ BROTLI_STATE_METABLOCK_HEADER_UNCOMPRESSED.,
148 BROTLI_STATE_METABLOCK_HEADER_RESERVEDcxx . . $ BROTLI_STATE_METABLOCK_HEADER_RESERVED.,
149 BROTLI_STATE_METABLOCK_HEADER_BYTEScxx . . $ BROTLI_STATE_METABLOCK_HEADER_BYTES.,
150 BROTLI_STATE_METABLOCK_HEADER_METADATAcxx . . $ BROTLI_STATE_METABLOCK_HEADER_METADATA.
151 } BrotliRunningMetablockHeaderStatecxx . . $ BrotliRunningMetablockHeaderState#;
152
153 typedef enumcxx . . $ $anonymous_type_8d5a752e512a1f79_2# {
154 BROTLI_STATE_UNCOMPRESSED_NONEcxx . . $ BROTLI_STATE_UNCOMPRESSED_NONE.,
155 BROTLI_STATE_UNCOMPRESSED_WRITEcxx . . $ BROTLI_STATE_UNCOMPRESSED_WRITE.
156 } BrotliRunningUncompressedStatecxx . . $ BrotliRunningUncompressedState#;
157
158 typedef enumcxx . . $ $anonymous_type_8d5a752e512a1f79_3# {
159 BROTLI_STATE_TREE_GROUP_NONEcxx . . $ BROTLI_STATE_TREE_GROUP_NONE.,
160 BROTLI_STATE_TREE_GROUP_LOOPcxx . . $ BROTLI_STATE_TREE_GROUP_LOOP.
161 } BrotliRunningTreeGroupStatecxx . . $ BrotliRunningTreeGroupState#;
162
163 typedef enumcxx . . $ $anonymous_type_8d5a752e512a1f79_4# {
164 BROTLI_STATE_CONTEXT_MAP_NONEcxx . . $ BROTLI_STATE_CONTEXT_MAP_NONE.,
165 BROTLI_STATE_CONTEXT_MAP_READ_PREFIXcxx . . $ BROTLI_STATE_CONTEXT_MAP_READ_PREFIX.,
166 BROTLI_STATE_CONTEXT_MAP_HUFFMANcxx . . $ BROTLI_STATE_CONTEXT_MAP_HUFFMAN.,
167 BROTLI_STATE_CONTEXT_MAP_DECODEcxx . . $ BROTLI_STATE_CONTEXT_MAP_DECODE.,
168 BROTLI_STATE_CONTEXT_MAP_TRANSFORMcxx . . $ BROTLI_STATE_CONTEXT_MAP_TRANSFORM.
169 } BrotliRunningContextMapStatecxx . . $ BrotliRunningContextMapState#;
170
171 typedef enumcxx . . $ $anonymous_type_8d5a752e512a1f79_5# {
172 BROTLI_STATE_HUFFMAN_NONEcxx . . $ BROTLI_STATE_HUFFMAN_NONE.,
173 BROTLI_STATE_HUFFMAN_SIMPLE_SIZEcxx . . $ BROTLI_STATE_HUFFMAN_SIMPLE_SIZE.,
174 BROTLI_STATE_HUFFMAN_SIMPLE_READcxx . . $ BROTLI_STATE_HUFFMAN_SIMPLE_READ.,
175 BROTLI_STATE_HUFFMAN_SIMPLE_BUILDcxx . . $ BROTLI_STATE_HUFFMAN_SIMPLE_BUILD.,
176 BROTLI_STATE_HUFFMAN_COMPLEXcxx . . $ BROTLI_STATE_HUFFMAN_COMPLEX.,
177 BROTLI_STATE_HUFFMAN_LENGTH_SYMBOLScxx . . $ BROTLI_STATE_HUFFMAN_LENGTH_SYMBOLS.
178 } BrotliRunningHuffmanStatecxx . . $ BrotliRunningHuffmanState#;
179
180 typedef enumcxx . . $ $anonymous_type_8d5a752e512a1f79_6# {
181 BROTLI_STATE_DECODE_UINT8_NONEcxx . . $ BROTLI_STATE_DECODE_UINT8_NONE.,
182 BROTLI_STATE_DECODE_UINT8_SHORTcxx . . $ BROTLI_STATE_DECODE_UINT8_SHORT.,
183 BROTLI_STATE_DECODE_UINT8_LONGcxx . . $ BROTLI_STATE_DECODE_UINT8_LONG.
184 } BrotliRunningDecodeUint8Statecxx . . $ BrotliRunningDecodeUint8State#;
185
186 typedef enumcxx . . $ $anonymous_type_8d5a752e512a1f79_7# {
187 BROTLI_STATE_READ_BLOCK_LENGTH_NONEcxx . . $ BROTLI_STATE_READ_BLOCK_LENGTH_NONE.,
188 BROTLI_STATE_READ_BLOCK_LENGTH_SUFFIXcxx . . $ BROTLI_STATE_READ_BLOCK_LENGTH_SUFFIX.
189 } BrotliRunningReadBlockLengthStatecxx . . $ BrotliRunningReadBlockLengthState#;
190
191 /* BrotliDecoderState addon, used for Compound Dictionary functionality. */
192 typedef struct BrotliDecoderCompoundDictionarycxx . . $ BrotliDecoderCompoundDictionary# {
193 int num_chunkscxx . . $ BrotliDecoderCompoundDictionary#num_chunks.;
194 int total_sizecxx . . $ BrotliDecoderCompoundDictionary#total_size.;
195 int br_indexcxx . . $ BrotliDecoderCompoundDictionary#br_index.;
196 int br_offsetcxx . . $ BrotliDecoderCompoundDictionary#br_offset.;
197 int br_lengthcxx . . $ BrotliDecoderCompoundDictionary#br_length.;
198 int br_copiedcxx . . $ BrotliDecoderCompoundDictionary#br_copied.;
199 const uint8_tcxx . . $ uint8_t#* chunkscxx . . $ BrotliDecoderCompoundDictionary#chunks.[16];
200 int chunk_offsetscxx . . $ BrotliDecoderCompoundDictionary#chunk_offsets.[16];
201 int block_bitscxx . . $ BrotliDecoderCompoundDictionary#block_bits.;
202 uint8_tcxx . . $ uint8_t# block_mapcxx . . $ BrotliDecoderCompoundDictionary#block_map.[256];
203 } BrotliDecoderCompoundDictionarycxx . . $ BrotliDecoderCompoundDictionary#;
204
205 typedef struct BrotliMetablockHeaderArenacxx . . $ BrotliMetablockHeaderArena# {
206 BrotliRunningTreeGroupStatecxx . . $ BrotliRunningTreeGroupState# substate_tree_groupcxx . . $ BrotliMetablockHeaderArena#substate_tree_group.;
207 BrotliRunningContextMapStatecxx . . $ BrotliRunningContextMapState# substate_context_mapcxx . . $ BrotliMetablockHeaderArena#substate_context_map.;
208 BrotliRunningHuffmanStatecxx . . $ BrotliRunningHuffmanState# substate_huffmancxx . . $ BrotliMetablockHeaderArena#substate_huffman.;
209
210 brotli_reg_tcxx . . $ uint64_t# sub_loop_countercxx . . $ BrotliMetablockHeaderArena#sub_loop_counter.;
211
212 brotli_reg_tcxx . . $ `c/common/platform.h:237:9`! repeat_code_lencxx . . $ BrotliMetablockHeaderArena#repeat_code_len.;
213 brotli_reg_tcxx . . $ uint64_t# prev_code_lencxx . . $ BrotliMetablockHeaderArena#prev_code_len.;
214
215 /* For ReadHuffmanCode. */
216 brotli_reg_tcxx . . $ `c/common/platform.h:237:9`! symbolcxx . . $ BrotliMetablockHeaderArena#symbol.;
217 brotli_reg_tcxx . . $ `c/common/platform.h:237:9`! repeatcxx . . $ BrotliMetablockHeaderArena#repeat.;
218 brotli_reg_tcxx . . $ `c/common/platform.h:237:9`! spacecxx . . $ BrotliMetablockHeaderArena#space.;
219
220 /* Huffman table for "histograms". */
221 HuffmanCodecxx . . $ HuffmanCode# tablecxx . . $ BrotliMetablockHeaderArena#table.[32];
222 /* List of heads of symbol chains. */
223 uint16_tcxx . . $ uint16_t#* symbol_listscxx . . $ BrotliMetablockHeaderArena#symbol_lists.;
224 /* Storage from symbol_lists. */
225 uint16_tcxx . . $ uint16_t# symbols_lists_arraycxx . . $ BrotliMetablockHeaderArena#symbols_lists_array.[BROTLI_HUFFMAN_MAX_CODE_LENGTHcxx . . $ `c/dec/huffman.h:18:9`! + 1 +
226 BROTLI_NUM_COMMAND_SYMBOLScxx . . $ `c/common/constants.h:25:9`!];
227 /* Tails of symbol chains. */
228 int next_symbolcxx . . $ BrotliMetablockHeaderArena#next_symbol.[32];
229 uint8_tcxx . . $ uint8_t# code_length_code_lengthscxx . . $ BrotliMetablockHeaderArena#code_length_code_lengths.[BROTLI_CODE_LENGTH_CODEScxx . . $ `c/common/constants.h:34:9`!];
230 /* Population counts for the code lengths. */
231 uint16_tcxx . . $ uint16_t# code_length_histocxx . . $ BrotliMetablockHeaderArena#code_length_histo.[16];
232 /* TODO(eustas): +2 bytes padding */
233
234 /* For HuffmanTreeGroupDecode. */
235 int htree_indexcxx . . $ BrotliMetablockHeaderArena#htree_index.;
236 HuffmanCodecxx . . $ HuffmanCode#* nextcxx . . $ BrotliMetablockHeaderArena#next.;
237
238 /* For DecodeContextMap. */
239 brotli_reg_tcxx . . $ uint64_t# context_indexcxx . . $ BrotliMetablockHeaderArena#context_index.;
240 brotli_reg_tcxx . . $ `c/common/platform.h:237:9`! max_run_length_prefixcxx . . $ BrotliMetablockHeaderArena#max_run_length_prefix.;
241 brotli_reg_tcxx . . $ uint64_t# codecxx . . $ BrotliMetablockHeaderArena#code.;
242 HuffmanCodecxx . . $ HuffmanCode# context_map_tablecxx . . $ BrotliMetablockHeaderArena#context_map_table.[BROTLI_HUFFMAN_MAX_SIZE_272cxx . . $ `c/dec/huffman.h:25:9`!];
243 } BrotliMetablockHeaderArenacxx . . $ BrotliMetablockHeaderArena#;
244
245 typedef struct BrotliMetablockBodyArenacxx . . $ BrotliMetablockBodyArena# {
246 uint8_tcxx . . $ uint8_t# dist_extra_bitscxx . . $ BrotliMetablockBodyArena#dist_extra_bits.[544];
247 brotli_reg_tcxx . . $ uint64_t# dist_offsetcxx . . $ BrotliMetablockBodyArena#dist_offset.[544];
248 } BrotliMetablockBodyArenacxx . . $ BrotliMetablockBodyArena#;
249
250 struct BrotliDecoderStateStructcxx . . $ BrotliDecoderStateStruct# {
251 BrotliRunningStatecxx . . $ BrotliRunningState# statecxx . . $ BrotliDecoderStateStruct#state.;
252
253 /* This counter is reused for several disjoint loops. */
254 int loop_countercxx . . $ BrotliDecoderStateStruct#loop_counter.;
255
256 BrotliBitReadercxx . . $ BrotliBitReader# brcxx . . $ BrotliDecoderStateStruct#br.;
257
258 brotli_alloc_funccxx . . $ brotli_alloc_func# alloc_funccxx . . $ BrotliDecoderStateStruct#alloc_func.;
259 brotli_free_funccxx . . $ brotli_free_func# free_funccxx . . $ BrotliDecoderStateStruct#free_func.;
260 void* memory_manager_opaquecxx . . $ BrotliDecoderStateStruct#memory_manager_opaque.;
261
262 /* Temporary storage for remaining input. Brotli stream format is designed in
263 a way, that 64 bits are enough to make progress in decoding. */
264 unioncxx . . $ BrotliDecoderStateStruct#$anonymous_type_8# {
265 uint64_tcxx . . $ uint64_t# u64cxx . . $ BrotliDecoderStateStruct#$anonymous_type_8#u64.;
266 uint8_tcxx . . $ uint8_t# u8cxx . . $ BrotliDecoderStateStruct#$anonymous_type_8#u8.[8];
267 } buffercxx . . $ BrotliDecoderStateStruct#buffer.;
268 brotli_reg_tcxx . . $ uint64_t# buffer_lengthcxx . . $ BrotliDecoderStateStruct#buffer_length.;
269
270 int poscxx . . $ BrotliDecoderStateStruct#pos.;
271 int max_backward_distancecxx . . $ BrotliDecoderStateStruct#max_backward_distance.;
272 int max_distancecxx . . $ BrotliDecoderStateStruct#max_distance.;
273 int ringbuffer_sizecxx . . $ BrotliDecoderStateStruct#ringbuffer_size.;
274 int ringbuffer_maskcxx . . $ BrotliDecoderStateStruct#ringbuffer_mask.;
275 int dist_rb_idxcxx . . $ BrotliDecoderStateStruct#dist_rb_idx.;
276 int dist_rbcxx . . $ BrotliDecoderStateStruct#dist_rb.[4];
277 int error_codecxx . . $ BrotliDecoderStateStruct#error_code.;
278 int meta_block_remaining_lencxx . . $ BrotliDecoderStateStruct#meta_block_remaining_len.;
279
280 uint8_tcxx . . $ uint8_t#* ringbuffercxx . . $ BrotliDecoderStateStruct#ringbuffer.;
281 uint8_tcxx . . $ uint8_t#* ringbuffer_endcxx . . $ BrotliDecoderStateStruct#ringbuffer_end.;
282 HuffmanCodecxx . . $ HuffmanCode#* htree_commandcxx . . $ BrotliDecoderStateStruct#htree_command.;
283 const uint8_tcxx . . $ uint8_t#* context_lookupcxx . . $ BrotliDecoderStateStruct#context_lookup.;
284 uint8_tcxx . . $ uint8_t#* context_map_slicecxx . . $ BrotliDecoderStateStruct#context_map_slice.;
285 uint8_tcxx . . $ uint8_t#* dist_context_map_slicecxx . . $ BrotliDecoderStateStruct#dist_context_map_slice.;
286
287 /* This ring buffer holds a few past copy distances that will be used by
288 some special distance codes. */
289 HuffmanTreeGroupcxx . . $ HuffmanTreeGroup# literal_hgroupcxx . . $ BrotliDecoderStateStruct#literal_hgroup.;
290 HuffmanTreeGroupcxx . . $ HuffmanTreeGroup# insert_copy_hgroupcxx . . $ BrotliDecoderStateStruct#insert_copy_hgroup.;
291 HuffmanTreeGroupcxx . . $ HuffmanTreeGroup# distance_hgroupcxx . . $ BrotliDecoderStateStruct#distance_hgroup.;
292 HuffmanCodecxx . . $ HuffmanCode#* block_type_treescxx . . $ BrotliDecoderStateStruct#block_type_trees.;
293 HuffmanCodecxx . . $ HuffmanCode#* block_len_treescxx . . $ BrotliDecoderStateStruct#block_len_trees.;
294 /* This is true if the literal context map histogram type always matches the
295 block type. It is then not needed to keep the context (faster decoding). */
296 int trivial_literal_contextcxx . . $ BrotliDecoderStateStruct#trivial_literal_context.;
297 /* Distance context is actual after command is decoded and before distance is
298 computed. After distance computation it is used as a temporary variable. */
299 int distance_contextcxx . . $ BrotliDecoderStateStruct#distance_context.;
300 brotli_reg_tcxx . . $ `c/common/platform.h:237:9`! block_lengthcxx . . $ BrotliDecoderStateStruct#block_length.[3];
301 brotli_reg_tcxx . . $ uint64_t# block_length_indexcxx . . $ BrotliDecoderStateStruct#block_length_index.;
302 brotli_reg_tcxx . . $ `c/common/platform.h:237:9`! num_block_typescxx . . $ BrotliDecoderStateStruct#num_block_types.[3];
303 brotli_reg_tcxx . . $ `c/common/platform.h:237:9`! block_type_rbcxx . . $ BrotliDecoderStateStruct#block_type_rb.[6];
304 brotli_reg_tcxx . . $ uint64_t# distance_postfix_bitscxx . . $ BrotliDecoderStateStruct#distance_postfix_bits.;
305 brotli_reg_tcxx . . $ `c/common/platform.h:237:9`! num_direct_distance_codescxx . . $ BrotliDecoderStateStruct#num_direct_distance_codes.;
306 brotli_reg_tcxx . . $ `c/common/platform.h:237:9`! num_dist_htreescxx . . $ BrotliDecoderStateStruct#num_dist_htrees.;
307 uint8_tcxx . . $ uint8_t#* dist_context_mapcxx . . $ BrotliDecoderStateStruct#dist_context_map.;
308 HuffmanCodecxx . . $ HuffmanCode#* literal_htreecxx . . $ BrotliDecoderStateStruct#literal_htree.;
309
310 /* For partial write operations. */
311 size_t rb_roundtripscxx . . $ BrotliDecoderStateStruct#rb_roundtrips.; /* how many times we went around the ring-buffer */
312 size_t partial_pos_outcxx . . $ BrotliDecoderStateStruct#partial_pos_out.; /* how much output to the user in total */
313
314 /* For InverseMoveToFrontTransform. */
315 brotli_reg_tcxx . . $ `c/common/platform.h:237:9`! mtf_upper_boundcxx . . $ BrotliDecoderStateStruct#mtf_upper_bound.;
316 uint32_tcxx . . $ uint32_t# mtfcxx . . $ BrotliDecoderStateStruct#mtf.[64 + 1];
317
318 int copy_lengthcxx . . $ BrotliDecoderStateStruct#copy_length.;
319 int distance_codecxx . . $ BrotliDecoderStateStruct#distance_code.;
320
321 uint8_tcxx . . $ uint8_t# dist_htree_indexcxx . . $ BrotliDecoderStateStruct#dist_htree_index.;
322 /* TODO(eustas): +3 bytes padding */
323
324 /* Less used attributes are at the end of this struct. */
325
326 brotli_decoder_metadata_start_funccxx . . $ brotli_decoder_metadata_start_func# metadata_start_funccxx . . $ BrotliDecoderStateStruct#metadata_start_func.;
327 brotli_decoder_metadata_chunk_funccxx . . $ brotli_decoder_metadata_chunk_func# metadata_chunk_funccxx . . $ BrotliDecoderStateStruct#metadata_chunk_func.;
328 void* metadata_callback_opaquecxx . . $ BrotliDecoderStateStruct#metadata_callback_opaque.;
329
330 /* For reporting. */
331 uint64_tcxx . . $ uint64_t# used_inputcxx . . $ BrotliDecoderStateStruct#used_input.; /* how many bytes of input are consumed */
332
333 /* States inside function calls. */
334 BrotliRunningMetablockHeaderStatecxx . . $ BrotliRunningMetablockHeaderState# substate_metablock_headercxx . . $ BrotliDecoderStateStruct#substate_metablock_header.;
335 BrotliRunningUncompressedStatecxx . . $ BrotliRunningUncompressedState# substate_uncompressedcxx . . $ BrotliDecoderStateStruct#substate_uncompressed.;
336 BrotliRunningDecodeUint8Statecxx . . $ BrotliRunningDecodeUint8State# substate_decode_uint8cxx . . $ BrotliDecoderStateStruct#substate_decode_uint8.;
337 BrotliRunningReadBlockLengthStatecxx . . $ BrotliRunningReadBlockLengthState# substate_read_block_lengthcxx . . $ BrotliDecoderStateStruct#substate_read_block_length.;
338
339 int new_ringbuffer_sizecxx . . $ BrotliDecoderStateStruct#new_ringbuffer_size.;
340 /* TODO(eustas): +4 bytes padding */
341
342 unsigned int is_last_metablockcxx . . $ BrotliDecoderStateStruct#is_last_metablock. : 1;
343 unsigned int is_uncompressedcxx . . $ BrotliDecoderStateStruct#is_uncompressed. : 1;
344 unsigned int is_metadatacxx . . $ BrotliDecoderStateStruct#is_metadata. : 1;
345 unsigned int should_wrap_ringbuffercxx . . $ BrotliDecoderStateStruct#should_wrap_ringbuffer. : 1;
346 unsigned int canny_ringbuffer_allocationcxx . . $ BrotliDecoderStateStruct#canny_ringbuffer_allocation. : 1;
347 unsigned int large_windowcxx . . $ BrotliDecoderStateStruct#large_window. : 1;
348 unsigned int window_bitscxx . . $ BrotliDecoderStateStruct#window_bits. : 6;
349 unsigned int size_nibblescxx . . $ BrotliDecoderStateStruct#size_nibbles. : 8;
350 /* TODO(eustas): +12 bits padding */
351
352 brotli_reg_tcxx . . $ `c/common/platform.h:237:9`! num_literal_htreescxx . . $ BrotliDecoderStateStruct#num_literal_htrees.;
353 uint8_tcxx . . $ uint8_t#* context_mapcxx . . $ BrotliDecoderStateStruct#context_map.;
354 uint8_tcxx . . $ uint8_t#* context_modescxx . . $ BrotliDecoderStateStruct#context_modes.;
355
356 BrotliSharedDictionarycxx . . $ BrotliSharedDictionaryInternal#* dictionarycxx . . $ BrotliDecoderStateStruct#dictionary.;
357 BrotliDecoderCompoundDictionarycxx . . $ BrotliDecoderCompoundDictionary#* compound_dictionarycxx . . $ BrotliDecoderStateStruct#compound_dictionary.;
358
359 uint32_tcxx . . $ uint32_t# trivial_literal_contextscxx . . $ BrotliDecoderStateStruct#trivial_literal_contexts.[8]; /* 256 bits */
360
361 unioncxx . . $ BrotliDecoderStateStruct#$anonymous_type_9# {
362 BrotliMetablockHeaderArenacxx . . $ BrotliMetablockHeaderArena# headercxx . . $ BrotliDecoderStateStruct#$anonymous_type_9#header.;
363 BrotliMetablockBodyArenacxx . . $ BrotliMetablockBodyArena# bodycxx . . $ BrotliDecoderStateStruct#$anonymous_type_9#body.;
364 } arenacxx . . $ BrotliDecoderStateStruct#arena.;
365 };
366
367 typedef struct BrotliDecoderStateStructcxx . . $ BrotliDecoderStateStruct# BrotliDecoderStateInternalcxx . . $ BrotliDecoderStateInternal#;
368 #define BrotliDecoderStatecxx . . $ `c/dec/state.h:368:9`! BrotliDecoderStateInternal
369
370 BROTLI_INTERNALcxx . . $ `c/include/brotli/port.h:252:9`! BROTLI_BOOLcxx . . $ `c/include/brotli/types.h:49:9`! BrotliDecoderStateInitcxx . . $ BrotliDecoderStateInit(6711db6abf207b4c).(BrotliDecoderStatecxx . . $ BrotliDecoderStateInternal#* s,
371 brotli_alloc_funccxx . . $ brotli_alloc_func# alloc_func, brotli_free_funccxx . . $ brotli_free_func# free_func, void* opaque);
372 BROTLI_INTERNALcxx . . $ `c/include/brotli/port.h:252:9`! void BrotliDecoderStateCleanupcxx . . $ BrotliDecoderStateCleanup(bb1fb99afd41e748).(BrotliDecoderStatecxx . . $ `c/dec/state.h:368:9`!* s);
373 BROTLI_INTERNALcxx . . $ `c/include/brotli/port.h:252:9`! void BrotliDecoderStateMetablockBegincxx . . $ BrotliDecoderStateMetablockBegin(bb1fb99afd41e748).(BrotliDecoderStatecxx . . $ `c/dec/state.h:368:9`!* s);
374 BROTLI_INTERNALcxx . . $ `c/include/brotli/port.h:252:9`! void BrotliDecoderStateCleanupAfterMetablockcxx . . $ BrotliDecoderStateCleanupAfterMetablock(bb1fb99afd41e748).(
375 BrotliDecoderStatecxx . . $ BrotliDecoderStateInternal#* s);
376 BROTLI_INTERNALcxx . . $ `c/include/brotli/port.h:252:9`! BROTLI_BOOLcxx . . $ `c/include/brotli/types.h:49:9`! BrotliDecoderHuffmanTreeGroupInitcxx . . $ BrotliDecoderHuffmanTreeGroupInit(20e2164bba7db65f).(
377 BrotliDecoderStatecxx . . $ BrotliDecoderStateInternal#* s, HuffmanTreeGroupcxx . . $ HuffmanTreeGroup#* group,
378 brotli_reg_tcxx . . $ `c/common/platform.h:237:9`! alphabet_size_max, brotli_reg_tcxx . . $ `c/common/platform.h:237:9`! alphabet_size_limit,
379 brotli_reg_tcxx . . $ uint64_t# ntrees);
380
381 #define BROTLI_DECODER_ALLOCcxx . . $ `c/dec/state.h:381:9`!(S, L) S->alloc_func(S->memory_manager_opaque, L)
382
383 #define BROTLI_DECODER_FREEcxx . . $ `c/dec/state.h:383:9`!(S, X) { \
384 S->free_func(S->memory_manager_opaque, X); \
385 X = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; \
386 }
387
388 /* Literal/Command/Distance block size maximum; same as maximum metablock size;
389 used as block size when there is no block switching. */
390 #define BROTLI_BLOCK_SIZE_CAPcxx . . $ `c/dec/state.h:390:9`! (1U << 24)
391
392 #if defined(__cplusplus) || defined(c_plusplus)
393 } /* extern "C" */
394 #endif
395
396 #endif /* BROTLI_DEC_STATE_H_ */