Skip to content

srijanmukherjee/huffman-compression

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

huffman-compression

A simple cli tool to compress/decompress text (for now) files using huffman coding algorithm.

Getting started

# 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

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: ""]

Result

  • examples/sample0.txt
1009K sample0.txt.bin
1.8M  examples/sample0.txt

Dependencies

License

This project is available under the MIT license

About

A huffman coding based text compression utilility tool.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published