Struct HuffmanTree#
Defined in File Inflate.h
Struct Documentation#
-
struct HuffmanTree#
Huffman tree struct, containing multiple representations of the tree.
Public Functions
-
constexpr HuffmanTree() noexcept = default#
Constructor.
-
consteval HuffmanTree(const HuffmanTree&) = delete#
Copy constructor.
-
consteval HuffmanTree &operator=(const HuffmanTree&) = delete#
Copy assignment operator.
-
constexpr HuffmanTree(HuffmanTree&&) noexcept = default#
Move constructor.
-
constexpr HuffmanTree &operator=(HuffmanTree&&) noexcept = default#
Move assignment operator,.
-
constexpr ~HuffmanTree() = default#
Destructor.
Public Members
Public Static Functions
-
static constexpr bool GetTreeInflateFixed(HuffmanTree &treeLL, HuffmanTree &treeD)#
Get the tree of a deflated block with fixed tree, as specified in the deflate specification.
- Parameters:
treeLL – Literal length huffman tree.
treeD – Distance huffman tree.
- Returns:
True on success, false otherwise.
-
static constexpr bool GetTreeInflateDynamic(HuffmanTree &treeLL, HuffmanTree &treeD, BitReader &reader)#
Get the tree of a deflated block with dynamic tree, the tree itself is also Huffman compressed with a known tree.
- Parameters:
treeLL – Literal length huffman tree.
treeD – Distance huffman tree.
reader – BitReader.
- Returns:
True on success, false otherwise.
Public Static Attributes
-
static constexpr std::array<u32, 29> LengthBase{3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258}#
-
static constexpr std::array<u32, 29> LengthExtra{0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0}#
-
constexpr HuffmanTree() noexcept = default#