Library for optimal compression using entropy/arithmetic/range coding.
While a binary coder is simpler and allows more optimization, it can only encode a binary choice at a time. At best it will produce one bit at a time.
A 64 bit coder is slower to encode a symbol (though this implementation aims to be fast). Yet it can handle a very large alphabet, and if the model permits, encode up to 63 bits at a time.
If we encode symbols with probability
If we encode a stream of
If we encode symbols with probabilities that are multiples of
Configuring your system:
apt-get install make git clang libunittest++-dev
Make sure clang supports -std=c++14
. The following should not produce errors:
echo "int main(){return 0;}" | clang++ -std=c++14 -x c++ - -o /dev/null
Obtaining the project source code:
git clone git@github.com:Recmo/EntropyCoder.git
cd EntropyCoder
Building the project source code:
make build
Testing the project build:
make run-tests
Submitting changes:
To be written
cd EntropyCoder
docker run -t -i -v (pwd)/.git:/git:ro ubuntu:wily /bin/bash
Then in the docker instance:
apt-get update
apt-get install -y git make clang pkg-config libunittest++-dev
git clone /git /build
cd /build
make