compress

package
v1.1.14 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

View Source
const (
	RndSeed int64 = 9009760027768254931
)

Variables

View Source
var (
	ErrUnknownAlgorithm = errors.New("unknown compress algorithm")
)

Functions

func DecodeBytesFunc

func DecodeBytesFunc(algo Algorithm) func(src []byte) (dst []byte, err error)

func DecodeStreamFunc

func DecodeStreamFunc(algo Algorithm) func(dst io.Writer, src io.Reader) (err error)

func EncodeBytesFunc

func EncodeBytesFunc(algo Algorithm) func(src []byte) (dst []byte, err error)

func EncodeStreamFunc

func EncodeStreamFunc(algo Algorithm) func(dst io.Writer, src io.Reader) (err error)

func NewDecFunc

func NewDecFunc(algo Algorithm) func(r io.Reader) io.ReadCloser

func NewEncFunc

func NewEncFunc(algo Algorithm) func(w io.Writer) encodable

Types

type Algorithm

type Algorithm uint8
const (
	AlgorithmUnknown Algorithm = iota
	AlgorithmZSTD
	AlgorithmZLib
	AlgorithmS2
	AlgorithmGZip
	AlgorithmDeflate
)

func ParseAlgorithm

func ParseAlgorithm(s any) Algorithm

func (Algorithm) IsValid

func (e Algorithm) IsValid() bool

func (Algorithm) String

func (e Algorithm) String() string

func (Algorithm) Value

func (e Algorithm) Value() uint8

Jump to

Keyboard shortcuts

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