axemaneric / huffman

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Huffman Text Compression for txt files

How to use

Huffman uses three files: MakeCode, Encode, and Decode

  1. Run MakeCode
    • Enter input file name. (eg. hamlet.txt)
    • Enter output code file name. (eg. code.code)
  2. Run Encode
    • Enter input file name. (eg. hamlet.txt)
    • Enter code file name. (eg. code.code)
    • Enter output compressed file name. (eg. hamlet.short)
  3. To decode compressed txt file, run Decode
    • Enter compressed file name. (eg. hamlet.short)
    • Enter code file name. (eg. code.code)
    • Enter output file name. (eg. hamletfull.txt)

Huffman Direct (No code file)

  1. Run Encode2
    • Enter input file name.
    • Enter output compressed file name.
  2. Run Decode2
    • Enter compressed file name.
    • Enter output file name.

About


Languages

Language:Java 100.0%