Skip to content

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

License

Notifications You must be signed in to change notification settings

himanshu-03/Parse-Zip-File-Compressor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published