class Huffman

Defined in:

huffman.cr

Constant Summary

VERSION = "0.1.0"

Constructors

Instance Method Summary

Constructor Detail

def self.new(text : String) #

Use phrase or letter to calculate hash map


[View source]
def self.new #

Use default ASCII table


[View source]

Instance Method Detail

def calculate(text) #

Uses Huffman methods to encode Tree


[View source]
def count_chars(text, chars) #

[View source]
def decode(encoded) #

[View source]
def encode(text) #

[View source]
def huffman(elements) #

[View source]
def print_frequency(chars) #

[View source]