| Compressed Text Encoding and Decoding Demo - using Huffman Tree |
This applet simply demonstrates how a text can be compressed by using the Huffman encoding algorithm along with Huffman Tree and Heap. The tables below are just an example of comparison of encoding schemes.
|
Using a standard encoding scheme
|
Using the Huffman encoding scheme
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Notes on source codes: The source codes is not efficiently written in terms of complexity of running time. view source code (to download, just right-click on the link and save it as .java file)
Command Syntax :
RESET, DELAY number, BEGIN-TEXT
text, END-TEXT, FREQUENCY-TABLE,
CREATE-CODE, ENCODE,
DECODE, STATS
NOTE : All commands should be capitalized, and each command and parameter should be separated by a single space.
Execute the following commands to test Huffman text encoding and decoding.
(COPY and PASTE the whole series of commands into the Text Area. Then, click on
the Execute button)
by Hyung-Joon Kim, CSE373, University of Washington