compressor

package
v1.4.6 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BrotliBestCompression = brotli.BestCompression
	BrotliBestSpeed       = brotli.BestSpeed
)
View Source
const (
	GzipBestCompression = gzip.BestCompression
	GzipBestSpeed       = gzip.BestSpeed
)
View Source
const (
	ZlibBestCompression = zlib.BestCompression
	ZlibBestSpeed       = zlib.BestSpeed
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Brotli

type Brotli struct {
	sync.Pool
}

func NewBrotli

func NewBrotli(level int) *Brotli

func (*Brotli) Compress

func (compressorPool *Brotli) Compress(target io.Writer, from []byte) error

type Compressor

type Compressor interface {
	Compress(to io.Writer, from []byte) error
}

type Gzip

type Gzip struct {
	sync.Pool
}

func NewGzip

func NewGzip(level int) *Gzip

func (*Gzip) Compress

func (compressorPool *Gzip) Compress(target io.Writer, from []byte) error

type Zlib

type Zlib struct {
	sync.Pool
}

func NewZlib

func NewZlib(level int) *Zlib

func (*Zlib) Compress

func (compressorPool *Zlib) Compress(target io.Writer, from []byte) error

Jump to

Keyboard shortcuts

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