This project implements a file compression and decompression utility using the Huffman coding algorithm. The Huffman coding algorithm is a popular method for lossless data compression.
- Build a Huffman Tree based on the frequency of characters in the input file.
- Generate Huffman codes for each character.
- Compress the input file using the generated Huffman codes.
- Decompress the compressed file back to the original content.
- Frequency Analysis: Read the input file and count the frequency of each character.
- Build Huffman Tree: Construct a Huffman Tree based on the character frequencies.
- Generate Codes: Traverse the Huffman Tree to generate binary codes for each character.
- Compression: Encode the input file using the generated Huffman codes and write the compressed data to the output file.
- Decompression: Read the compressed file, decode it using the Huffman Tree, and write the original content to the output file.
- Clone the repository:
git clone https://github.com/starlord0104/HuffmanCodingCompressionDecompression.git