#include "puffin/src/huffman_table.h"
#include <algorithm>
#include <cstring>
#include <vector>
#include "puffin/src/logging.h"
string;
vector;
namespace puffin {
const uint8_t kPermutations[19] = …;
const uint16_t kLengthBases[30] = …;
const uint8_t kLengthExtraBits[29] = …;
const uint16_t kDistanceBases[31] = …;
const uint8_t kDistanceExtraBits[30] = …;
HuffmanTable::HuffmanTable() : … { … }
bool HuffmanTable::InitHuffmanCodes(const Buffer& lens, size_t* max_bits) { … }
bool HuffmanTable::BuildHuffmanCodes(const Buffer& lens,
vector<uint16_t>* hcodes,
size_t* max_bits) { … }
bool HuffmanTable::BuildHuffmanReverseCodes(const Buffer& lens,
vector<uint16_t>* rcodes,
size_t* max_bits) { … }
bool HuffmanTable::BuildFixedHuffmanTable() { … }
bool HuffmanTable::BuildDynamicHuffmanTable(BitReaderInterface* br,
uint8_t* buffer,
size_t* length) { … }
bool HuffmanTable::BuildHuffmanCodeLengths(BitReaderInterface* br,
uint8_t* buffer,
size_t* length,
size_t max_bits,
size_t num_codes,
Buffer* lens) { … }
bool HuffmanTable::BuildDynamicHuffmanTable(const uint8_t* buffer,
size_t length,
BitWriterInterface* bw) { … }
bool HuffmanTable::BuildHuffmanCodeLengths(const uint8_t* buffer,
size_t* length,
BitWriterInterface* bw,
size_t num_codes,
Buffer* lens) { … }
string BlockTypeToString(BlockType type) { … }
}