Skip to content

TG199/huffit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Huffit

A fast and lightweight command-line tool for compressing and decompressing text files using the Huffman encoding algorithm.

⚠️ Project Status: In Development
This project is currently a work in progress. Features are being actively implemented and tested.

✨ Goals

  • 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).

πŸš€ Planned Features

  • 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

πŸ“¦ Usage (Coming Soon)

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.

About

A data compression tool

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages