A lossless compressor and decompressor using Huffman encoding algorithm
Clone this repository, change directory to the project folder and run
make huffman
./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
.
./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
.
make test-all
Run these commands in the project directory
./huffman -c sample_test.txt
./huffman -d default_compressed
diff default_decompressed sample_test.txt
This project is licensed under the MIT License - see the LICENSE.txt file for details