Implementation of Compression Huffman Algorithm in C++
Huffman's algorithm uses a file compression method based on the probability of occurrence of characters in text.
In this implementation the Huffman Algorithm is defined by the concept of digital search, described by Digital Search Tree, which will allow the compression and decompression of text files (.txt
).
This code will receive a input file, a .txt
file which will be compressed, and generates two files as output:
encoded.txt
: represents the compressed file, in binary. This file is the result of running Huffman's algorithm on the input file.decoded.txt
: represents the decoded file. This file is the result of applying Huffman's algorithm on theencoded.txt
file. In other words, it's decompression. This file works as a validation, because if the algorithm perfor