Debian Codegraph @

c/enc/brotli_bit_stream.h

raw symbols SCIP
1 /* Copyright 2014 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 /* Functions to convert brotli-related data structures into the
8 brotli bit stream. The functions here operate under
9 assumption that there is enough space in the storage, i.e., there are
10 no out-of-range checks anywhere.
11
12 These functions do bit addressing into a byte array. The byte array
13 is called "storage" and the index to the bit is called storage_ix
14 in function arguments. */
15
16 #ifndef BROTLI_ENC_BROTLI_BIT_STREAM_H_
17 #define BROTLI_ENC_BROTLI_BIT_STREAM_H_cxx . . $ `c/enc/brotli_bit_stream.h:17:9`!
18
19 #include "../common/context.h"cxx . . $ `<file>/c/common/context.h`/
20 #include "../common/platform.h"cxx . . $ `<file>/c/common/platform.h`/
21 #include "command.h"cxx . . $ `<file>/c/enc/command.h`/
22 #include "entropy_encode.h"cxx . . $ `<file>/c/enc/entropy_encode.h`/
23 #include "memory.h"cxx . . $ `<file>/c/enc/memory.h`/
24 #include "metablock.h"cxx . . $ `<file>/c/enc/metablock.h`/
25
26 #if defined(__cplusplus) || defined(c_plusplus)
27 extern "C" {
28 #endif
29
30 /* All Store functions here will use a storage_ix, which is always the bit
31 position for the current storage. */
32
33 BROTLI_INTERNALcxx . . $ `c/include/brotli/port.h:252:9`! void BrotliStoreHuffmanTreecxx . . $ BrotliStoreHuffmanTree(1323badeb1d66257).(const uint8_tcxx . . $ uint8_t#* depths, size_t num,
34 HuffmanTreecxx . . $ HuffmanTree#* tree, size_t* storage_ix, uint8_tcxx . . $ uint8_t#* storage);
35
36 BROTLI_INTERNALcxx . . $ `c/include/brotli/port.h:252:9`! void BrotliBuildAndStoreHuffmanTreeFastcxx . . $ BrotliBuildAndStoreHuffmanTreeFast(e26f03fd0cc3b6c2).(
37 HuffmanTreecxx . . $ HuffmanTree#* tree, const uint32_tcxx . . $ uint32_t#* histogram, const size_t histogram_total,
38 const size_t max_bits, uint8_tcxx . . $ uint8_t#* depth, uint16_tcxx . . $ uint16_t#* bits, size_t* storage_ix,
39 uint8_tcxx . . $ uint8_t#* storage);
40
41 /* REQUIRES: length > 0 */
42 /* REQUIRES: length <= (1 << 24) */
43 BROTLI_INTERNALcxx . . $ `c/include/brotli/port.h:252:9`! void BrotliStoreMetaBlockcxx . . $ BrotliStoreMetaBlock(11e6213aa12964a7).(MemoryManagercxx . . $ MemoryManager#* m,
44 const uint8_tcxx . . $ uint8_t#* input, size_t start_pos, size_t length, size_t mask,
45 uint8_tcxx . . $ uint8_t# prev_byte, uint8_tcxx . . $ uint8_t# prev_byte2, BROTLI_BOOLcxx . . $ `c/include/brotli/types.h:49:9`! is_last,
46 const BrotliEncoderParamscxx . . $ BrotliEncoderParams#* params, ContextTypecxx . . $ ContextType# literal_context_mode,
47 const Commandcxx . . $ Command#* commands, size_t n_commands, const MetaBlockSplitcxx . . $ MetaBlockSplit#* mb,
48 size_t* storage_ix, uint8_tcxx . . $ uint8_t#* storage);
49
50 /* Stores the meta-block without doing any block splitting, just collects
51 one histogram per block category and uses that for entropy coding.
52 REQUIRES: length > 0
53 REQUIRES: length <= (1 << 24) */
54 BROTLI_INTERNALcxx . . $ `c/include/brotli/port.h:252:9`! void BrotliStoreMetaBlockTrivialcxx . . $ BrotliStoreMetaBlockTrivial(2106f843caf9bd5).(MemoryManagercxx . . $ MemoryManager#* m,
55 const uint8_tcxx . . $ uint8_t#* input, size_t start_pos, size_t length, size_t mask,
56 BROTLI_BOOLcxx . . $ `c/include/brotli/types.h:49:9`! is_last, const BrotliEncoderParamscxx . . $ BrotliEncoderParams#* params,
57 const Commandcxx . . $ Command#* commands, size_t n_commands,
58 size_t* storage_ix, uint8_tcxx . . $ uint8_t#* storage);
59
60 /* Same as above, but uses static prefix codes for histograms with a only a few
61 symbols, and uses static code length prefix codes for all other histograms.
62 REQUIRES: length > 0
63 REQUIRES: length <= (1 << 24) */
64 BROTLI_INTERNALcxx . . $ `c/include/brotli/port.h:252:9`! void BrotliStoreMetaBlockFastcxx . . $ BrotliStoreMetaBlockFast(2106f843caf9bd5).(MemoryManagercxx . . $ MemoryManager#* m,
65 const uint8_tcxx . . $ uint8_t#* input, size_t start_pos, size_t length, size_t mask,
66 BROTLI_BOOLcxx . . $ `c/include/brotli/types.h:49:9`! is_last, const BrotliEncoderParamscxx . . $ BrotliEncoderParams#* params,
67 const Commandcxx . . $ Command#* commands, size_t n_commands,
68 size_t* storage_ix, uint8_tcxx . . $ uint8_t#* storage);
69
70 /* This is for storing uncompressed blocks (simple raw storage of
71 bytes-as-bytes).
72 REQUIRES: length > 0
73 REQUIRES: length <= (1 << 24) */
74 BROTLI_INTERNALcxx . . $ `c/include/brotli/port.h:252:9`! void BrotliStoreUncompressedMetaBlockcxx . . $ BrotliStoreUncompressedMetaBlock(caa85e592c9f70c8).(
75 BROTLI_BOOLcxx . . $ `c/include/brotli/types.h:49:9`! is_final_block, const uint8_tcxx . . $ uint8_t#* BROTLI_RESTRICTcxx . . $ `c/common/platform.h:82:9`! input,
76 size_t position, size_t mask, size_t len,
77 size_t* BROTLI_RESTRICTcxx . . $ `c/common/platform.h:82:9`! storage_ix, uint8_tcxx . . $ uint8_t#* BROTLI_RESTRICTcxx . . $ `c/common/platform.h:82:9`! storage);
78
79 #if defined(__cplusplus) || defined(c_plusplus)
80 } /* extern "C" */
81 #endif
82
83 #endif /* BROTLI_ENC_BROTLI_BIT_STREAM_H_ */