This repository contains an implementation of Huffman coding, a data compression algorithm, in C++.
Huffman coding is a lossless data compression algorithm that is used to reduce the size of files without losing any information. It works by assigning variable-length codes to different characters based on their frequency of occurrence in the input text.
This implementation provides functions to compress and decompress text files using Huffman coding.
huffman_coding.cpp
: The main code file containing the implementation of Huffman coding.sample.txt
andharrypotter.txt
:input files for testing.sample_compressed.txt
andharrypotter_compressed.txt
: Compressed files generated after compression..sample_decompressed.txt
andharrypotter_decompressed.txt
: Decompressed files extracted from the compressed files.
Contributions are welcome! If you find any issues or have suggestions for improvements, please feel free to submit a pull request.