Skip to content

lossless compression and decompression using Huffman encoding

License

Notifications You must be signed in to change notification settings

ttrung149/huffman

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

lossless compression and decompression using Huffman encoding

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published