huffman

package
v0.0.0-...-118f76d Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2023 License: MIT Imports: 6 Imported by: 0

README

Huffman compression

Here is implementation of Huffman compression. Based on Chapter 5 of the book.

https://algs4.cs.princeton.edu/55compression/

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compress

func Compress(input io.Reader, output io.Writer) error

Compress compresses *data*. https://algs4.cs.princeton.edu/55compression/Huffman.java.html

func Expand

func Expand(input io.Reader, output io.Writer) error

Expand expands *data*. https://algs4.cs.princeton.edu/55compression/Huffman.java.html

Types

type CompressError

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

CompressError is returned when compress failed.

func (CompressError) Error

func (e CompressError) Error() string

func (CompressError) Unwrap

func (e CompressError) Unwrap() error

type ExpandError

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

ExpandError is returned when expand failed.

func (ExpandError) Error

func (e ExpandError) Error() string

func (ExpandError) Unwrap

func (e ExpandError) Unwrap() error

Jump to

Keyboard shortcuts

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