Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/srijanmukherjee/huffman-compression
A huffman coding based text compression utilility tool.
https://github.com/srijanmukherjee/huffman-compression
compression cpp huffman-coding
Last synced: 9 days ago
JSON representation
A huffman coding based text compression utilility tool.
- Host: GitHub
- URL: https://github.com/srijanmukherjee/huffman-compression
- Owner: srijanmukherjee
- License: mit
- Created: 2023-10-13T21:20:15.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-24T20:23:14.000Z (about 1 year ago)
- Last Synced: 2023-10-25T19:27:34.846Z (about 1 year ago)
- Topics: compression, cpp, huffman-coding
- Language: C++
- Homepage:
- Size: 24.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# huffman-compression
A simple cli tool to compress/decompress text (for now) files using [huffman coding algorithm](https://en.wikipedia.org/wiki/Huffman_coding).
## Getting started
```sh
# Clone the repository (SSH)
git clone --recurse-submodules [email protected]: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] filePositional arguments:
file path to fileOptional 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
- [p-ranav/argparse](https://github.com/p-ranav/argparse) for cli argument parsing## License
This project is available under the [MIT](https://opensource.org/license/mit/) license