compress

package
v0.0.0-...-af5c341 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Sepa = []byte("#^#")

Functions

This section is empty.

Types

type Compressor

type Compressor interface {
	Compress([]byte) ([]byte, error)
	Decompress([]byte) ([]byte, error)
	GetName() string
}

func NewCompressor

func NewCompressor(method string) (Compressor, error)

type Default

type Default struct {
}

func (Default) Compress

func (d Default) Compress(in []byte) ([]byte, error)

func (Default) Decompress

func (d Default) Decompress(in []byte) ([]byte, error)

func (Default) GetName

func (d Default) GetName() string

type Gzip

type Gzip struct {
}

func (*Gzip) Compress

func (g *Gzip) Compress(in []byte) ([]byte, error)

func (*Gzip) Decompress

func (g *Gzip) Decompress(in []byte) ([]byte, error)

func (*Gzip) GetName

func (g *Gzip) GetName() string

type Lz4

type Lz4 struct {
}

func (*Lz4) Compress

func (l *Lz4) Compress(in []byte) ([]byte, error)

func (*Lz4) Decompress

func (l *Lz4) Decompress(in []byte) ([]byte, error)

func (*Lz4) GetName

func (l *Lz4) GetName() string

type Zstd

type Zstd struct {
}

func (*Zstd) Compress

func (z *Zstd) Compress(in []byte) ([]byte, error)

func (*Zstd) Decompress

func (z *Zstd) Decompress(in []byte) ([]byte, error)

func (*Zstd) GetName

func (z *Zstd) GetName() string

Jump to

Keyboard shortcuts

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