rangecoder

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2019 License: ISC Imports: 0 Imported by: 0

Documentation

Overview

Package rangecoer implements a range coder as per 3.8.1. Range Coding Mode of draft-ietf-cellar-ffv1.

Index

Constants

This section is empty.

Variables

View Source
var DefaultStateTransition = [256]uint8{}/* 256 elements not displayed */

3.8.1.5. default_state_transition

Functions

This section is empty.

Types

type Coder

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

Coder is an instance of a range coder, as defined in:

Nigel, G. and N. Martin, "Range encoding: an algorithm for
removing redundancy from a digitised message.", July 1979.

func NewCoder

func NewCoder(buf []byte) *Coder

NewCoder creates a new range coder instance.

See: 3.8.1. Range Coding Mode

func (*Coder) BR

func (c *Coder) BR(state []uint8) bool

BR gets the next range coded Boolean symbol.

See: 4. Bitstream

func (*Coder) GetPos

func (c *Coder) GetPos() int

GetPos gets the current position in the bitstream.

func (*Coder) SR

func (c *Coder) SR(state []uint8) int32

SR gets the next range coded signed scalar symbol.

See: 4. Bitstream

func (*Coder) SentinalEnd

func (c *Coder) SentinalEnd()

SentinalEnd ends the current range coder.

See: 3.8.1.1.1. Termination

  • Sentinal Mode

func (*Coder) SetTable

func (c *Coder) SetTable(table [256]uint8)

func (*Coder) UR

func (c *Coder) UR(state []uint8) uint32

UR gets the next range coded unsigned scalar symbol.

See: 4. Bitstream

Jump to

Keyboard shortcuts

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