Skip to content

jkbestami/ConditionalHuffmanCoding

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is an implementation of a conditional Huffman coding, a variation on Huffman coding.
In this variation, each triplet of characters such as 'dac' has a set of huffman code trees associated with it.
These Huffman codes are generated by taking into account the frequency of the letters that come after each occurence of
the triplet in the corpus. Hence, "conditional".


This results in MUCH more trees, but at the expense of time (for generating all these trees) and space (storing them),
we hopefully achieve a more efficient coding.






TO COMPILE:

javac ConditionalHuffman.java


TO RUN:

java ConditionalHuffman [corpusFile]

***DEFAULTS TO MOBY DICK IF NOT PROVIDED***

***Make sure corpus used is in the working directory of the ConditionalHuffman program***

***Input corpus file name as command-line argument***


Follow given instructions to choose whether to encode or decode.


About

Conditional Huffman Coding, a variation on Huffman coding.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages