huffman

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 2, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompSZ

func CompSZ(chars []byte, hist []uint16) uint

Sizing sizing huffman code length

Types

type Code

type Code struct {
	Freq   uint   // frequence of the symbol in text
	Len    byte   // length of the prefix code
	Prefix uint16 // code of the prefix encoding
}

Code a node in Huffman Tree

func CanonicalCode

func CanonicalCode(chars []byte, hist []uint16) ([256]*Code, byte)

CanonicalCode returns canonical Huffman code, and depth of the tree

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL