#arithmetic-coding #coding #arithmetic #lossless #entropy #binary-encoding #cacm87

bin+lib simple-arithmetic-coding

Arithmetic coding, directly derived from the well-known CACM87 C-language implementation

1 unstable release

0.1.1 Aug 8, 2024
0.1.0 Aug 8, 2024

#270 in Compression

Download history 189/week @ 2024-08-05 6/week @ 2024-08-12 29/week @ 2024-09-16 10/week @ 2024-09-23 72/week @ 2024-09-30 4/week @ 2024-10-07

86 downloads per month

MIT license

25KB
785 lines

Arithmetic coding in Rust

A simple arithmetic coder implementation that should be easy to read. Includes a driver binary and a library. By default a binary is built.

Build

Run cargo build --release.

Run encoding routine

Run target/release/simple-arithmetic-coding -e <input from stdin>. For example on Linux, just pipe your file using cat, and then direct the output to file: cat war_and_peace.txt | target/release/simple-arithmetic-coding -e > output.bin

Run decoding routine

Run target/release/simple-arithmetic-coding -d <input from stdin>.

Dependencies

~150KB