In this assigment, you need some text files. Click HERE to download some.
In this assignment, you are to implement the Fixed-length Huffman coding that we learn in the class. You should perform the following:
1- Huffman Encoder.
a. This is a C++ program that reads as input a text file. The file is read character by character and count the number of unique characters. b. Translate the number of unique characters into Binary and check the number of bits required. c. Based on this number, provide a unique code for each occurance in the characters. d. Start encoding the text file using the codes. e. Save the code table as well as the encoded text file.
a. This is a C++ program that reads as input the code table and the encoded text file generated from 1 above.
b. The encoded input file must in binary.
c. Read the code words from the file and decode them to the designated character from the code table.
d. The output must be the same text file that was read in step 1.