A fast and lightweight command-line tool for compressing and decompressing text files using the Huffman encoding algorithm.
This project is currently a work in progress. Features are being actively implemented and tested.
- Implement a full Huffman encoder and decoder from scratch.
- Explore mechanical sympathy and CPU-level optimizations.
- Learn and apply efficient data structures (binary trees, bit-level operations).
- Compare compression ratios with standard tools (e.g.
gzip).
- Read text files and compute character frequencies.
- Build and serialize the Huffman tree.
- Encode text using a prefix-free Huffman code table.
- Write compressed data along with necessary metadata.
- Decode compressed files back into original text.
- Support CLI flags:
--compress,--decompress. - Fix bugs
Once implemented, usage will look like:
# Compress a file
huff compress test.txt
# Decompress it
huff decompress compressed.huff
π οΈ Development
Clone the repo and build:
git clone https://github.com/TG199/Huffit.git
cd Huffit
cargo build
Run tests:
cargo test
π License
This project is licensed under the MIT License.