/Huffman-Compression

Lossless text compression using Huffman Coding.

Primary LanguageKotlin

Huffman-Compression

Algorithm for lossless compression for text by designating unique variable-sized binary code rather than fixed-sized binary codes to different characters. Regularly occurring characters are allowed smaller sized binary codes and less frequently occurring characters are assigned larger sized binary codes. All the characters existing in the text file, variable-sized binary codes, and ASCII values are used to encode and decode the text.

Image source: https://en.wikipedia.org/wiki/Huffman_coding#/media/File:Huffman_tree_2.svg