Skip to content

Instantly share code, notes, and snippets.

View dan-masek's full-sized avatar

Dan Mašek dan-masek

  • Hradec Kralove, CZ
View GitHub Profile
@dan-masek
dan-masek / 3_symbol_alphabet_arithmetic_coding.cpp
Created March 9, 2018 00:30
Example of coding 3 symbol alphabet close to entropy.
// Using FastAC by Amir Said -- http://www.cipr.rpi.edu/research/SPIHT/EW_Code/FastAC.zip
#include "arithmetic_codec.h"
#include <algorithm>
#include <cstdint>
#include <iostream>
#include <vector>
std::size_t const ALPHABET_SIZE(2);
int32_t const EOF_SYMBOL(ALPHABET_SIZE);