compress

package module
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2016 License: BSD-3-Clause Imports: 2 Imported by: 13

README

compress

parallelized modular compression library

Compress is a compression library that is modular and parallelized. Compress supports Bijective Burrows Wheeler compression with arithmetic coding. Different models for arithmetic coding are supported.

notes

fractal has been moved to github.com/pointlander/frak

Documentation

Index

Constants

View Source
const (
	BUFFER_COUNT          = 1 << 3
	BUFFER_SIZE           = 1 << 10
	BUFFER_CHAN_SIZE      = BUFFER_COUNT - 2
	BUFFER_POOL_SIZE      = BUFFER_COUNT * BUFFER_SIZE
	BUFFER_POOL_SIZE_MASK = BUFFER_POOL_SIZE - 1
)
View Source
const (
	MAX_SCALE16 = (1 << (16 - 2)) - 1
	MAX_SCALE32 = (1 << (32 - 2)) - 1
)
View Source
const SYMBOL_SIZE = 9

Variables

This section is empty.

Functions

This section is empty.

Types

type Coder16

type Coder16 struct {
	Alphabit uint16
	Input    <-chan []uint16
	Output   func(symbol uint16) bool
}

func (Coder16) AdaptiveCoder

func (coder Coder16) AdaptiveCoder() Model

func (Coder16) AdaptiveCoder32

func (coder Coder16) AdaptiveCoder32() Model32

func (Coder16) AdaptiveDecoder

func (decoder Coder16) AdaptiveDecoder() Model

func (Coder16) AdaptiveDecoder32

func (decoder Coder16) AdaptiveDecoder32() Model32

func (Coder16) AdaptivePredictiveBitCoder

func (coder Coder16) AdaptivePredictiveBitCoder() Model

func (Coder16) AdaptivePredictiveBitDecoder

func (decoder Coder16) AdaptivePredictiveBitDecoder() Model

func (Coder16) AdaptivePredictiveCoder

func (coder Coder16) AdaptivePredictiveCoder() Model

func (Coder16) AdaptivePredictiveCoder32

func (coder Coder16) AdaptivePredictiveCoder32() Model32

func (Coder16) AdaptivePredictiveDecoder

func (decoder Coder16) AdaptivePredictiveDecoder() Model

func (Coder16) AdaptivePredictiveDecoder32

func (decoder Coder16) AdaptivePredictiveDecoder32() Model32

type Coder8

type Coder8 struct {
	Alphabit uint16
	Input    <-chan []uint8
	Output   func(symbol uint8) bool
}

func BijectiveBurrowsWheelerCoder

func BijectiveBurrowsWheelerCoder(input <-chan []byte) Coder8

func BijectiveBurrowsWheelerDecoder

func BijectiveBurrowsWheelerDecoder(input <-chan []byte) Coder8

func BurrowsWheelerCoder

func BurrowsWheelerCoder(input <-chan []byte) (Coder8, <-chan int)

func BurrowsWheelerDecoder

func BurrowsWheelerDecoder(input <-chan []byte, sentinels <-chan int) Coder8

func (Coder8) MoveToFrontCoder

func (coder Coder8) MoveToFrontCoder() Coder16

func (Coder8) MoveToFrontDecoder

func (coder Coder8) MoveToFrontDecoder() Coder16

func (Coder8) MoveToFrontRunLengthCoder

func (coder Coder8) MoveToFrontRunLengthCoder() Coder16

func (Coder8) MoveToFrontRunLengthDecoder

func (coder Coder8) MoveToFrontRunLengthDecoder() Coder16

type Edge

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

type Lyndon

type Lyndon struct {
	Words [][]uint8
}

func (*Lyndon) Factor

func (l *Lyndon) Factor(s []uint8)

type Model

type Model struct {
	Scale  uint32
	Input  <-chan []Symbol
	Output func(code uint16) Symbol
}

func (Model) Code

func (model Model) Code(out io.Writer)

func (Model) Decode

func (model Model) Decode(in io.Reader)

type Model32

type Model32 struct {
	Scale  uint64
	Input  <-chan []Symbol32
	Output func(code uint32) Symbol32
}

func (Model32) Code

func (model Model32) Code(out io.Writer)

func (Model32) Decode

func (model Model32) Decode(in io.Reader)

type Rotations

type Rotations []rotation

func (Rotations) Len

func (r Rotations) Len() int

func (Rotations) Less

func (r Rotations) Less(i, j int) bool

func (Rotations) Swap

func (r Rotations) Swap(i, j int)

type SuffixTree

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

func BuildSuffixTree

func BuildSuffixTree(input []byte) *SuffixTree

func (*SuffixTree) BurrowsWheelerCoder

func (tree *SuffixTree) BurrowsWheelerCoder() (<-chan byte, <-chan int)

func (*SuffixTree) Index

func (tree *SuffixTree) Index(sep string) int

type Symbol

type Symbol struct {
	Scale, Low, High uint16
}

type Symbol32

type Symbol32 struct {
	Scale, Low, High uint32
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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