#include <cassert>
#include <cstddef>
#include <cstdint>
#include <unordered_map>
#include <variant>
#include <vector>
#include "alphabet.hh"
Go to the source code of this file.
|
| template<class State, class Symbol> |
| using | CodeBook = std::vector<std::pair<Symbol, std::pair<State,int>>> |
| | The type of a code book - a map from symbols to codes and their lengths.
|
|
| template<class State, class Freq, class Symbol> |
| CodeBook< State, Symbol > | huffmanCodeBook (Frequencies< Freq, Symbol > const &f) |
| | Creates a code book for a fixed-length code of minimal size.
|