No description
Find a file
2025-12-04 19:33:49 -08:00
bench benchmark, test suite, and run length encoding 2025-10-27 13:15:58 -07:00
src remove markov chain from arithmetic compression in preparition for move to front transform 2025-12-04 19:33:49 -08:00
src-exe benchmark, test suite, and run length encoding 2025-10-27 13:15:58 -07:00
test remove markov chain from arithmetic compression in preparition for move to front transform 2025-12-04 19:33:49 -08:00
.envrc compression works 2024-04-13 02:13:24 -07:00
.gitignore benchmark, test suite, and run length encoding 2025-10-27 13:15:58 -07:00
compress.cabal remove markov chain from arithmetic compression in preparition for move to front transform 2025-12-04 19:33:49 -08:00
flake.lock remove markov chain from arithmetic compression in preparition for move to front transform 2025-12-04 19:33:49 -08:00
flake.nix benchmark, test suite, and run length encoding 2025-10-27 13:15:58 -07:00
fourmolu.yaml dependency bump & fourmolu 2024-04-15 02:58:48 -07:00
LICENSE Add LICENSE 2024-04-15 20:35:54 -07:00
README.md decompression works 2024-04-15 19:18:24 -07:00

Compresses files using Huffman coding.

On The Great Gatsby in plain text on project Gutenberg, it achieves a 0.526 compression ratio when using a word size of two bytes. On an arbitrary RAW image, it peaks at .622 with a 32 bit word size and .645 with a 16 bit one.

To run with Nix:

nix run ".#" --experimental-features "nix-command flakes" -- compress < myFile > myFile.compressed
nix run ".#" --experimental-features "nix-command flakes" -- decompress < myFile.compressed > myFile-decompressed
sha256sum myFile myFile-decompressed
wc -c myFile.compressed myFile 

To run with cabal:

cabal run . -- compress < myFile > myFile.compressed
cabal run . -- decompress < myFile > myFile-decompressed
sha256sum myFile myFile-decompressed
wc -c myFile.compressed myFile