A simple cli tool to compress/decompress text (for now) files using huffman coding algorithm.
# Clone the repository (SSH)
git clone --recurse-submodules git@github.com:srijanmukherjee/huffman-compression.git
# Clone the repository (HTTPS)
git clone --recurse-submodules https://github.com/srijanmukherjee/huffman-compression.git
# initialize build directory
make init
# to build the project
make
# to compress a text file
./build/huffman filepath
# to decompress
./build/huffman -d filepath
Usage: huffman [--help] [--version] [--verbose] [--decompress] [--output VAR] file
Positional arguments:
file path to file
Optional arguments:
-h, --help shows help message and exits
-v, --version prints version information and exits
--verbose enable verbose output
-d, --decompress decompress file
-o, --output output file path [default: ""]
- examples/sample0.txt
1009K sample0.txt.bin
1.8M examples/sample0.txt
- p-ranav/argparse for cli argument parsing
This project is available under the MIT license