/Huffman

Huffman coding and decoding with GUI

Primary LanguageJava

Huffman coding and decoding in Java with GUI

By:
Mohammed Almansour
Yazeed Almusallam
Abdulrahman Almazroa

Introduction

This code was implemented for algorithm course project. Key notes:

  • This was implemented in java
  • It uses priority queue, min heap and hash map data structures.
  • The input is file or written text in GUI.
  • The output is through console or GUI (which one you prefer).
  • There is class to test random data generated in random way to analyze the time complexity.
  • GraphViz was used to visualize the output tree.

Installation

You need to download GraphViz to visualize the output tree.

How to use

After installing the java files, first you have to write a text in a file, then run main.java, the User interface will appear and then choose to attach your file in order perform the huffman algorithm. you can also write in text box instead of attaching your file.

Output

The application will generate an output in GUI or the Console, also it will generate a text file dictionary of codewords (letter to code). Moreover it will generate a dot file to use in GraphViz.