Programmers use Huffman codes for encoding files to save up space.
A PDF to the Huffman tree is available in this repository here.
A guide to Huffman trees in given in the Book by Elliot B. Koffman.
Here is your problem statement.
The user will input a string in your program.
- convert the string to a lowercase string
- map all the characters of the lowercase string to their 8-bit binary representation.
- show the full 8-bit binary encoded string of the user's input string.
- map all the characters of the lowercase string to the huffman tree codes for the characters and space.
- show the full variable length encoded string of the user's input string.