compress

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2026 License: EUPL-1.2 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compress

func Compress(data []byte, format string) ([]byte, error)

Compress compresses data using the specified format.

func Decompress

func Decompress(data []byte) ([]byte, error)

Decompress decompresses data, detecting the format automatically.

func NewCompressWriter added in v0.3.0

func NewCompressWriter(w io.Writer, format string) (io.WriteCloser, error)

NewCompressWriter returns a streaming io.WriteCloser that compresses data written to it into the underlying writer w using the specified format. Supported formats: "gz" (gzip), "xz", "none" or "" (passthrough). Unknown formats return an error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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