KASKADE 7 development version
Loading...
Searching...
No Matches
prefixcoder.hh File Reference
#include <cassert>
#include <cstddef>
#include <cstdint>
#include <unordered_map>
#include <variant>
#include <vector>
#include "alphabet.hh"

Go to the source code of this file.

Classes

class  PrefixCode< Symbol, State_ >
class  PrefixEncoder< Symbol, OIter, Output, State >
 An encoder for arbitrary prefix codes. More...
class  PrefixDecoder< Symbol, IIter, Input, State >
 A decoder for arbitrary prefix codes. More...
class  HuffmanCodec< Symbol >
 A simple Huffman codec with byte-oriented bitstream. More...

Typedefs

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.

Functions

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.