zstd

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompressLevel

func CompressLevel(scratch []byte, in []byte, level int) ([]byte, error)

Compress compresses the given source data. Scratch can be passed to prevent prevent allocation. If it is too small, or if nil is passed, a new buffer will be allocated and returned. Arg level specifies the compression level. level < 0 means the default compression level.

func Decompress

func Decompress(scratch []byte, in []byte) ([]byte, error)

Decompress uncompresses the given source data. Scratch can be passed to prevent allocation. If it is too small, or if nil is passed, a new buffer will be allocated and returned.

func NewReader

func NewReader(r io.Reader) (io.ReadCloser, error)

NewReader creates a ReadCloser that uncompresses data. The returned object must be Closed after use.

func NewWriter

func NewWriter(w io.Writer) (io.WriteCloser, error)

NewWriter creates a WriterCloser that compresses data. The returned object must be Closed after use.

Types

This section is empty.

Jump to

Keyboard shortcuts

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