write my assignment 13699

I need help with writing a Huffman code encoder, specifically in c++.

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 allEnglish letters together with all printable characters such as “. I”, space etc. The capital letter and the corresponding small letter are treatedas two symbols. For example, “A” anda “ ” are regarded as two symbolsHere we don’t consider carriage return In other words, you only need toconsider the characters from “space~ ” in the ASCII table. The output of hmencoder should have two output files, “code.tx ” and“encodemsg.tx ”. The output file “code.txt” stores the codeword for each symbol and theaverage 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 arelisted according to the increasing order of the corresponding ASCII codevalue. The last row shows the average number of bits used for eachsymbol. E.g. Space: 000!: 001 2:1000Ave = 3.43 bits per symbol The output file “encodemsgtxt” stores the encoded message with 80 0/1characters on each row (except the last row).

 
"Not answered?"
Get the Answer