compress

package
v2.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2026 License: Apache-2.0 Imports: 5 Imported by: 1 module, 0 packages

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

View Source
const (
	Gzip   = "Gzip"
	Snappy = "Snappy"
)

constants

Variables

View Source
var (
	ErrInputEmpty = errors.New("input cannot be empty")
)

error definition

Functions

func CompGzip

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

CompGzip uses gzip to compress the input bytes

func CompSnappy

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

CompSnappy uses Snappy to compress the input bytes

func Compress

func Compress(value []byte, compressor string) ([]byte, error)

Compress compresses input according to compressor

func DecompGzip

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

DecompGzip uses gzip to uncompress the input bytes

func DecompSnappy

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

DecompSnappy uses Snappy to decompress the input bytes

func Decompress

func Decompress(value []byte, compressor string) ([]byte, error)

Decompress decompresses input according to compressor

Types

This section is empty.

Jump to

Keyboard shortcuts

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