Question: Build a data compression system using the Huffmans algorithm. In other other words, you are given a sequence of alphabet characters and you are asked
Build a data compression system using the Huffmans algorithm. In other other words, you are given a sequence of alphabet characters and you are asked to construct the Huffmans code. Your output.txt file should have the bit representation for every character that appears in the file (and should not contain characters that are NOT present in the input file).
Sample output.txt (any valid Huffman code in this format):
a:0
b:101
c:100
d:111
e:1101
f:1100
Sample input.txt (all characters on a single line with no spaces bewteen):
ffffeeeeeeeeefccccccccccccbbbbbbbbbbbbbddddddddddddddddaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
JAVA or C++
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
