compress

package
v1.0.0-test.2 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Compressor

type Compressor interface {
	Encode(data, src []byte) []byte
	Decode(data, src []byte) ([]byte, error)
}

func NewCompressor

func NewCompressor(cType string) Compressor

type DirectCompressor

type DirectCompressor struct{}

func NewDirectCompressor

func NewDirectCompressor() *DirectCompressor

func (DirectCompressor) Decode

func (DirectCompressor) Decode(data, src []byte) ([]byte, error)

func (DirectCompressor) Encode

func (DirectCompressor) Encode(data, src []byte) []byte

type SnappyCompressor

type SnappyCompressor struct {
}

func NewSnappyCompressor

func NewSnappyCompressor() *SnappyCompressor

func (*SnappyCompressor) Decode

func (s *SnappyCompressor) Decode(data, src []byte) ([]byte, error)

func (*SnappyCompressor) Encode

func (s *SnappyCompressor) Encode(data, src []byte) []byte

type ZSTDCompressor

type ZSTDCompressor struct {
	Encoder *zstd.Encoder
	Decoder *zstd.Decoder
}

func NewZSTDCompressor

func NewZSTDCompressor() *ZSTDCompressor

func (*ZSTDCompressor) Decode

func (zsc *ZSTDCompressor) Decode(data, src []byte) ([]byte, error)

func (*ZSTDCompressor) Encode

func (zsc *ZSTDCompressor) Encode(data, src []byte) []byte

Jump to

Keyboard shortcuts

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