compress

package
v0.0.0-...-012694b Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Compresser

type Compresser struct {
	// contains filtered or unexported fields
}

Compresser compresser

func New

func New(m Method) *Compresser

New create new compresser

func (*Compresser) Compress

func (cp *Compresser) Compress(data []byte) ([]byte, error)

Compress compress func

func (*Compresser) Decompress

func (cp *Compresser) Decompress(data []byte) ([]byte, error)

Decompress decompress func

func (*Compresser) SetLevel

func (cp *Compresser) SetLevel(level int)

SetLevel set compress level

type Method

type Method byte

Method compress method

const (
	// Gzip gzip method
	Gzip Method = iota
	// Zstd zstd method
	Zstd
)

Jump to

Keyboard shortcuts

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