Skip to content

huffmancoding

Using a Huffman Tree to encode and decode a text file.

  1. Compile HuffmanDemo.java (javac HuffmanDemo.java), thus compiling all neccessary files aswell.
  2. Run HuffmanDemo (java Huffman)
  3. Input the file name of the message you want to encode followed by “Encoded.txt” and “Huffman.txt”.