compress

package
v1.3.1-rc0 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2021 License: Apache-2.0 Imports: 5 Imported by: 2

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 added in v1.1.2

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

CompGzip uses gzip to compress the input bytes

func CompSnappy added in v1.1.2

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 added in v1.1.2

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

DecompGzip uses gzip to uncompress the input bytes

func DecompSnappy added in v1.1.2

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