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: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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