Debian Codegraph @

libs/brotli/enc/block_splitter.h

raw
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 /* Block split point selection utilities. */
8
9 #ifndef BROTLI_ENC_BLOCK_SPLITTER_H_
10 #define BROTLI_ENC_BLOCK_SPLITTER_H_
11
12 #include "../common/platform.h"
13 #include "command.h"
14 #include "memory.h"
15
16 #if defined(__cplusplus) || defined(c_plusplus)
17 extern "C" {
18 #endif
19
20 typedef struct BlockSplit {
21 size_t num_types; /* Amount of distinct types */
22 size_t num_blocks; /* Amount of values in types and length */
23 uint8_t* types;
24 uint32_t* lengths;
25
26 size_t types_alloc_size;
27 size_t lengths_alloc_size;
28 } BlockSplit;
29
30 BROTLI_INTERNAL void BrotliInitBlockSplit(BlockSplit* self);
31 BROTLI_INTERNAL void BrotliDestroyBlockSplit(MemoryManager* m,
32 BlockSplit* self);
33
34 BROTLI_INTERNAL void BrotliSplitBlock(MemoryManager* m,
35 const Command* cmds,
36 const size_t num_commands,
37 const uint8_t* data,
38 const size_t offset,
39 const size_t mask,
40 const BrotliEncoderParams* params,
41 BlockSplit* literal_split,
42 BlockSplit* insert_and_copy_split,
43 BlockSplit* dist_split);
44
45 #if defined(__cplusplus) || defined(c_plusplus)
46 } /* extern "C" */
47 #endif
48
49 #endif /* BROTLI_ENC_BLOCK_SPLITTER_H_ */