#include "huffman.h"
#include <string.h>
#include "../common/constants.h"
#include "../common/platform.h"
#include <brotli/types.h>
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
#define BROTLI_REVERSE_BITS_MAX …
#if defined(BROTLI_RBIT)
#define BROTLI_REVERSE_BITS_BASE …
#else
#define BROTLI_REVERSE_BITS_BASE …
static uint8_t kReverseBits[1 << BROTLI_REVERSE_BITS_MAX] = …;
#endif
#define BROTLI_REVERSE_BITS_LOWEST …
static BROTLI_INLINE brotli_reg_t BrotliReverseBits(brotli_reg_t num) { … }
static BROTLI_INLINE void ReplicateValue(HuffmanCode* table,
int step, int end,
HuffmanCode code) { … }
static BROTLI_INLINE int NextTableBitSize(const uint16_t* const count,
int len, int root_bits) { … }
void BrotliBuildCodeLengthsHuffmanTable(HuffmanCode* table,
const uint8_t* const code_lengths,
uint16_t* count) { … }
uint32_t BrotliBuildHuffmanTable(HuffmanCode* root_table,
int root_bits,
const uint16_t* const symbol_lists,
uint16_t* count) { … }
uint32_t BrotliBuildSimpleHuffmanTable(HuffmanCode* table,
int root_bits,
uint16_t* val,
uint32_t num_symbols) { … }
#if defined(__cplusplus) || defined(c_plusplus)
}
#endif