Skip to content

Latest commit

 

History

History
64 lines (45 loc) · 2.63 KB

README.md

File metadata and controls

64 lines (45 loc) · 2.63 KB

Parse-Zip-File-Compressor

Parser Zip File Compressor program utilizes Huffman coding to efficiently compress and decompress files without any data loss.

This is a C language implementation of the Huffman compression algorithm, a popular lossless data compression technique. The algorithm works by assigning variable-length codes to each symbol in a message based on their frequency of occurrence, with more frequent symbols assigned shorter codes.


Sample File Compression

1. Sample1.txt

  • Original File size: 17,01,978 bytes
  • Compressed File size: 9,26,037 bytes
  • Compression Rate: ~45.6%

Sample 1


Executing

Run the batch file:

./Makefile.bat

(or) Execute the command:

gcc -Wall -save-temps "client.c" "encode.c" "decode.c" "huffman.c" -o ""Huffman.exe"

For compressing the file Use -encode as flag For reverting to original file Use -decode as flag

To start executing

./Huffman.exe <flag> <filepath>

Example: For Encoding the sample1.txt file

./Huffman.exe -encode "./Example/sample1.txt"

For decoding the sample1.txt.huff file

./Huffman.exe -decode "./Example/sample1.txt.huff"

🪪 License

This project follows the MIT LICENSE.


Connect with me

Github     LinkedIn     Twitter     Instagram     Gmail   

(Back to top)