i got another assignenment but i don't understand and couldn't firguge how how to write this program
here is the assignment:
Huffman encoding is a text compression technique. It uses bit patterns of different lengths to encode characters. Commonly used letters use short bit patterns and less commonly used letters are coded with longer patterns. Other characters simply use their standard ASCII codes. The table below shows an example of how such codes might be organised.
Huffman Code Character
Under this encoding scheme the word CAT would be stored as 1000110111 and BAT would be stored as 01000010110111.
Write a program that will read a text file specified by the user, and encode it using the Huffman code above. The program should also be able to open files that have been encoded as binary strings and translate them back into characters.
Your program should use an interface similar to the one shown.
1 Encode a text file
2 Decode a compressed file
Which operation would you like to perform? 1
What is the name of the input file?
File not found. Please try again"¦
What is the name of the output file?
Since there will be no screen output you must submit printed versions of 3 files:
"¢ your program listing
"¢ the output file that your program produces when it encodes sample.txt
"¢ the output file that your program produces when it decodes sample2.huf
anyone help me plzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz...............