This project is a Huffman encoding program, created for problem 3 in this assignment for this course.
Given an alphabet and the relative frequencies of each letter, it creates a binary code for each letter, such that letters that show up more in the language (have larger frequencies) will have shorter codes, while letters that show up less often in the language (have smaller frequencies) will have longer codes. When using a code to represent a word in a language, on average, a code produced through Huffman encoding will be shorter than an encoding algorithm that gives every letter a code with the same length.
I use tester.jar
, a tester library, and javalib.jar
, an image library, both built by my professor! To use these libraries, include them in whatever project contains these .java files as an external jar. To run the program, set your run configurations to use tester.Main
as the main class, with the name of the ExamplesAutomata
class as the program argument.