class

Huffman

Inherits Reference < Object

TODO: Write documentation for Huffman

Constants

VERSION = "0.1.0"

Constructors

new(tree : Array(Huffman::Node), ids : Nil | Array(Int32), leaf_num : Int32)
Source

Class methods

compile(counts : Array(Int32), desc : Bool = false)
Source
compile(counts : Array(Int64), desc : Bool = false)
Source
from_io(io : IO, format : IO::ByteFormat)
Source

Instance methods

binary(id : Int32)
Source
count(id : Int32)
Source
leaf?(id : Int32)
Source
leaf_num
Source
left(id : Int32)
Source
node(id : Int32) : Pointer(Node)
Source
path_code(id : Int32)
Source
path_codes
Source
path_codes
Source
right(id : Int32)
Source
to_io(io : IO, format : IO::ByteFormat)
Source

Nested types