#huffman #compression #decompression

bin+lib huffcomp

Huffman coding program for compression and decompression of text files

8 releases

0.1.24 Aug 27, 2020
0.1.23 Aug 14, 2020

#568 in Command line utilities

Download history 58/week @ 2020-08-06 53/week @ 2020-08-13 16/week @ 2020-08-20 31/week @ 2020-08-27 33/week @ 2020-09-03 1/week @ 2020-09-17 9/week @ 2020-09-24 8/week @ 2020-10-01 26/week @ 2020-10-15 2/week @ 2020-10-22 1/week @ 2020-10-29 24/week @ 2020-11-05

64 downloads per month

MIT/Apache

16KB
353 lines

huffcomp

Crate

Huffman coding program for compression and decompression of text files.

Installation

If you're a Rust programmer, huffcomp can be installed with cargo.

$ cargo install huffcomp

Building

huffcomp can be build from source code using the Rust compiler.

$ git clone https://github.com/AlexRiosJ/huffcomp.git
$ cd huffcomp
$ cargo build --release

Usage

It is possible for huffcomp to compress any kind of files that have UTF-8 valid encoding. (e.g. *.txt, *.c, *.rs, *.java, *.js)

To compress the file:

$ huffcomp -c <filename>

This command will generate a HUFF file (*.huff) which will have the same name as the original but with the huffcomp extension concatenated at the end.

To decompress a file it must have this extension and be compressed by huffcomp previously.

To decompress the file:

$ huffcomp -d <huffcomp_file>

Contribute

To contribute, please fork the repository. If you find any bugs, issues or suggestions, please post your Issues and create your Pull Requests.

Used Techniques

  • Huffman Coding Tree implementation.
  • Bit level operations.
  • Write and read files.

Dependencies

~0.8–1.4MB
~32K SLoC