This project implements a Huffman coding tool to compress and decompress text files efficiently. The tool uses Huffman coding to reduce file sizes while maintaining data integrity.
- Efficient Compression: Reduces file sizes using Huffman coding.
- Fast Decompression: Quickly restores original files with minimal data loss.
- Advanced Algorithms: Utilizes priority queues and optimal tree construction techniques.
- C++ Implementation: Demonstrates proficiency in C++ with advanced algorithms and memory management.
encode.cpp: Main file to execute the Huffman compression.decode.cpp: Main file to execute the Huffman decompression.huffman.cpp: Contains the implementation of the Huffman coding algorithm.huffman.hpp: Header file defining the Huffman tree structure and methods.
- C++ Compiler: Ensure you have g++ installed on your system.
- Clone the Repository:
git clone https://github.com/DeepAryanSharma/FileZipper.git cd FileZipper - Compile the Code:
g++ -o huffman_compressor encode.cpp huffman.cpp g++ -o huffman_decompressor decode.cpp huffman.cpp
- Run the Program:
./huffman_compressor input.txt compressed.huf ./huffman_decompressor compressed.huf output.txt
Place the input file input.txt in the same directory as the executable. Run the compression program to generate the compressed file compressed.huf. Then, run the decompression program to restore the original file as output.txt.
- Compress the File:
- Decompress the File:
Contributions are welcome! Please fork this repository and submit pull requests for any improvements or bug fixes.
For any questions or feedback, please reach out to aryan153sharma@gmail.com .




