Question: I need help in writing a Huffmans code encoder specifically in C++. The sample input: The sample output (code): The sample output (encodemsg): You are

I need help in writing a Huffmans code encoder specifically in C++.
 I need help in writing a Huffmans code encoder specifically in
The sample input:
C++. The sample input: The sample output (code): The sample output (encodemsg):
The sample output (code):
You are required to write a Huffman code encoder Details Name your
The sample output (encodemsg):
program as "hmencoder". Usage of hmencoder: hmencoder [input file] where input file

You are required to write a Huffman code encoder Details Name your program as "hmencoder". Usage of hmencoder: hmencoder [input file] where input file is the file containing the input message The input message contains normal English text. You need to encode all English letters together with all printable characters such as".", ",", "!", space etc. The capital letter and the corresponding small letter are treated as two symbols. For example, "A" and "a" are regarded as two symbols. Here we don't consider carriage return. In other words, you only need to consider the characters from "space" to ~'in the ASCII table. The output of hmencoder should have two output files, "code.txt" and "encodemsg.txt". . The output file "code.txt" stores the codeword for each symbol and the average number of bits used for each symbol. The format of this output file is as follows: Each row contains the codeword for a separate symbol, the symbols are listed according to the increasing order of the corresponding ASCII code value. The last row shows the average number of bits used for each symbol. Space: 000 : 001 A: 0100 z: 1000 Ave 3.43 bits per symbol The output file "encodemsg.txt" stores the encoded message with 80 0/1 characters on each row (except the last row)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!