ac

package
v0.0.0-...-eb2da4d Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EOF = 256
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	Probability

	*InputBuffer
	*OutputBuffer
	// contains filtered or unexported fields
}

Context holds the state for the arithmetic encoder/decoder.

func NewContext

func NewContext() *Context

NewContext creates a new arithmetic coding context.

func (*Context) Decode

func (ac *Context) Decode(encoded []byte) []byte

Decode takes an encoded byte slice and decodes it.

func (*Context) Encode

func (ac *Context) Encode(data []byte) []byte

Encode takes a slice of bytes and encodes it using arithmetic coding.

func (*Context) Reset

func (ac *Context) Reset()

type InputBuffer

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

func NewInputBuffer

func NewInputBuffer() *InputBuffer

type OutputBuffer

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

func NewOutputBuffer

func NewOutputBuffer() *OutputBuffer

type Probability

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

Jump to

Keyboard shortcuts

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