Skip to content

Generates Huffman encoding of characters from input file resulting in compressing sample file to 58% of original size.

License

Notifications You must be signed in to change notification settings

JeffreyKozik/HuffmanEncoder

Repository files navigation

HuffmanEncoder

Notes

  • Input file is read, HashMap stores frequencies, ArrayList encapsulates data in nodes then is turned into Huffman Tree which encodes characters.
  • Created for Data Structures class in March 2020.
  • The original file is the "truncated" Little Women file. It's named "truncated" because it's just the first 50 KB of the book, not the whole thing.
  • The "encoded" Little Women file is the result of the huffman encoding.
  • It's important to note the program doesn't actually perform sophisticated binary manipulation - rather it replaces each character with its huffman encoded binary equivalent (so a series of the characters "1" and "0"). This means the "encoded" file actually takes up more space than the original file. But, it's really the idea that counts in terms of generating the Huffman encoding.

About

Generates Huffman encoding of characters from input file resulting in compressing sample file to 58% of original size.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages