#include <types.hpp>
|
symbol_type | m_symbol |
|
code_type | m_code |
|
length_type | m_length |
|
Struct to store data for a Huffman code.
- Author
- Timothy Flynn (trfly.nosp@m.nn89.nosp@m.@pm.m.nosp@m.e)
- Version
- July 7, 2019
◆ HuffmanCode() [1/3]
fly::coders::HuffmanCode::HuffmanCode |
( |
| ) |
|
|
noexcept |
Default constructor. Set all fields to zero.
◆ HuffmanCode() [2/3]
fly::coders::HuffmanCode::HuffmanCode |
( |
symbol_type |
symbol, |
|
|
code_type |
code, |
|
|
length_type |
length |
|
) |
| |
|
noexcept |
Constructor.
- Parameters
-
symbol | The symbol from the input stream. |
code | The Huffman code for the symbol. |
length | The number of bits in the Huffman code. |
◆ HuffmanCode() [3/3]
fly::coders::HuffmanCode::HuffmanCode |
( |
HuffmanCode && |
code | ) |
|
|
noexcept |
Move constructor. Move all member variables from the given HuffmanCode instance into this instance.
- Parameters
-
◆ operator=()
Move assignment operator. Move all member variables from the given HuffmanCode instance into this instance.
- Parameters
-
◆ operator<
Less-than operator. Huffman codes are first compared by code length, then by symbol value.
- Parameters
-
left | The first Huffman code to compare. |
right | The second Huffman code to compare. |
- Returns
- True if the first Huffman code is less than the second.
The documentation for this struct was generated from the following files:
- fly/coders/huffman/types.hpp
- fly/coders/huffman/types.cpp