huffman

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode([]byte) ([]byte, error)

func Encode

func Encode([]byte) ([]byte, error)

Types

type Tree

type Tree struct {
	// contains filtered or unexported fields
}

func New

func New(symbol []rune, weight []int) *Tree

func (*Tree) Get

func (t *Tree) Get(sym rune) (string, bool)

Get symbol to binary representation

func (*Tree) Lookup

func (t *Tree) Lookup(bin string) (rune, bool)

Lookup binary representation to symbol

func (*Tree) String

func (t *Tree) String() string

String print tree ASCII TEXT

Jump to

Keyboard shortcuts

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