lz4

package
v1.3.7 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2019 License: MIT, BSD-2-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// MaxInputSize is the largest buffer than can be compressed in a single block
	MaxInputSize = 0x7E000000
)

Variables

View Source
var (
	// ErrTooLarge indicates the input buffer was too large
	ErrTooLarge       = errors.New("input too large")
	ErrEncodeTooSmall = errors.New("encode buffer too small")
)
View Source
var (
	// ErrCorrupt indicates the input was corrupt
	ErrCorrupt = errors.New("corrupt input")
)

Functions

func CompressBound

func CompressBound(isize int) int

CompressBound returns the maximum length of a lz4 block

func Decode

func Decode(dst, src []byte) (int, error)

Decode returns the decoded form of src. The returned slice may be a subslice of dst if it was large enough to hold the entire decoded block.

func Encode

func Encode(dst, src []byte) (compressedSize int, error error)

Encode returns the encoded form of src. The returned array may be a sub-slice of dst if it was large enough to hold the entire output.

Types

This section is empty.

Jump to

Keyboard shortcuts

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