16#ifndef BROTLI_ENC_BROTLI_BIT_STREAM_H_
17#define BROTLI_ENC_BROTLI_BIT_STREAM_H_
21#include "../common/context.h"
22#include "../common/platform.h"
24#include "entropy_encode.h"
28#if defined(__cplusplus) || defined(c_plusplus)
35BROTLI_INTERNAL
void BrotliStoreHuffmanTree(
const uint8_t* depths,
size_t num,
36 HuffmanTree* tree,
size_t* storage_ix, uint8_t* storage);
38BROTLI_INTERNAL
void BrotliBuildAndStoreHuffmanTreeFast(
39 HuffmanTree* tree,
const uint32_t* histogram,
const size_t histogram_total,
40 const size_t max_bits, uint8_t* depth, uint16_t* bits,
size_t* storage_ix,
46 const uint8_t* input,
size_t start_pos,
size_t length,
size_t mask,
47 uint8_t prev_byte, uint8_t prev_byte2,
BROTLI_BOOL is_last,
50 size_t* storage_ix, uint8_t* storage);
56BROTLI_INTERNAL
void BrotliStoreMetaBlockTrivial(
MemoryManager* m,
57 const uint8_t* input,
size_t start_pos,
size_t length,
size_t mask,
59 const Command* commands,
size_t n_commands,
60 size_t* storage_ix, uint8_t* storage);
66BROTLI_INTERNAL
void BrotliStoreMetaBlockFast(
MemoryManager* m,
67 const uint8_t* input,
size_t start_pos,
size_t length,
size_t mask,
69 const Command* commands,
size_t n_commands,
70 size_t* storage_ix, uint8_t* storage);
76BROTLI_INTERNAL
void BrotliStoreUncompressedMetaBlock(
77 BROTLI_BOOL is_final_block,
const uint8_t* BROTLI_RESTRICT input,
78 size_t position,
size_t mask,
size_t len,
79 size_t* BROTLI_RESTRICT storage_ix, uint8_t* BROTLI_RESTRICT storage);
81#if defined(BROTLI_TEST)
82void GetBlockLengthPrefixCodeForTest(uint32_t,
size_t*, uint32_t*, uint32_t*);
85#if defined(__cplusplus) || defined(c_plusplus)
Definition: command.h:108
Definition: entropy_encode.h:21
Common types used in decoder and encoder API.
#define BROTLI_BOOL
A portable bool replacement.
Definition: types.h:49