listing continued string getstring()return integer parseint( )//end class treeapp ///////////////////////////////////////////////////////////////you can use the + key combination to exit from this programin the interest of simplicity there' no single-letter key for this action the huffman code you shouldn' get the idea that binary trees are always search trees many binary trees are used in other ways we saw an example in figure where binary tree represents an algebraic expression in this section we'll discuss an algorithm that uses binary tree in surprising way to compress data it' called the huffman codeafter david huffman who discovered it in data compression is important in many situations an example is sending data over the internetwhereespecially over dial-up connectiontransmission can take long time an implementation of this scheme is somewhat lengthyso we won' show complete program insteadwe'll focus on the concepts and leave the implementation as an exercise character codes each character in normal uncompressed text file is represented in the computer by one byte (for the venerable ascii codeor by two bytes (for the newer unicodewhich is designed to work for all languages in these schemesevery character requires the same number of bits table shows how some characters are represented in binary using the ascii code as you can seeevery character takes bits table some ascii codes character decimal binary