Skip to content

Latest commit

 

History

History
53 lines (35 loc) · 1.08 KB

README.md

File metadata and controls

53 lines (35 loc) · 1.08 KB

huffman-compressor

A lossless compressor and decompressor using Huffman encoding algorithm

Installing

Clone this repository, change directory to the project folder and run

make huffman

Docs

Compress a file

./huffman -c <input_file_name> [compressed_file_name]
./huffman --compress <input_file_name> [compressed_file_name]

Input file name is required. Compressed file name if not specified is default_compressed.

Decompress a file

./huffman -d <compressed_file_name> [decompressed_file_name]
./huffman --decompress <compressed_file_name> [decompressed_file_name]

Compressed file name is required. Decompressed file name if not specified is default_decompressed.

Tests

make test-all

Examples

Run these commands in the project directory

./huffman -c sample_test.txt
./huffman -d default_compressed
diff default_decompressed sample_test.txt

Authors

License

This project is licensed under the MIT License - see the LICENSE.txt file for details