compress

package
v0.0.0-...-fbb2b8c Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidCodec = errors.New("invalid compression codec")

Functions

func Decode

func Decode(buf []byte, codec Codec) ([]byte, error)

Decode the provided byte slice according to the compression codec

func Encode

func Encode(buf []byte, codec Codec) ([]byte, error)

Encode the provided byte slice

Types

type Codec

type Codec int8
const (
	CodecNone Codec = iota
	CodecSnappy
	CodecZlib
	CodecLz4
	CodecZstd
)

func (Codec) String

func (c Codec) String() string

String converts Codec to string

Jump to

Keyboard shortcuts

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