huffman

package
v0.0.0-...-5787e7a Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compress

func Compress(fileContents []byte) []byte

func Decompress

func Decompress(fileContents []byte) []byte

func NewReader

func NewReader(r io.Reader) io.Reader

func NewWriter

func NewWriter(w io.Writer) io.WriteCloser

Types

type HuffmanLeaf

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

func (HuffmanLeaf) Freq

func (self HuffmanLeaf) Freq() int

type HuffmanNode

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

func (HuffmanNode) Freq

func (self HuffmanNode) Freq() int

type HuffmanTree

type HuffmanTree interface {
	Freq() int
}

type Reader

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

func (*Reader) Read

func (r *Reader) Read(content []byte) (n int, err error)

type Writer

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

func (*Writer) Close

func (writer *Writer) Close() error

func (*Writer) Write

func (writer *Writer) Write(data []byte) (n int, err error)

Jump to

Keyboard shortcuts

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