| Crates.io | huff_rs |
| lib.rs | huff_rs |
| version | 0.2.1 |
| created_at | 2021-03-01 14:48:06.283677+00 |
| updated_at | 2025-11-16 00:35:14.807735+00 |
| description | Encode and decode files with Huffman coding. |
| homepage | |
| repository | https://github.com/Treeniks/huff_rs |
| max_upload_size | |
| id | 362219 |
| size | 28,564 |
I created this for fun after having to implement Huffman coding for a university project. It utilizes the bitvec crate to create the bitsequences. The performance of this program is honestly pretty bad. The file format for the compressed files is something arbitrary I came up with.
git clone https://github.com/Treeniks/huff_rs
cd huff_rs
cargo build --release
./target/release/huff_rs --version
cargo install huff_rs
To encode a file:
huff_rs encode file.txt
The default output filename will be the same as the input with the extension replaced by .huff. You can also specify the output filename with -o:
huff_rs encode file.txt -o compressed.huff
To decode a file:
huff_rs decode file.huff
The default output filename will be the same as the input with the extension replaced by .txt. You can also specify the output filename with -o:
huff_rs decode file.huff -o original.txt