compress

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Compress   = defaultInstance.Compress
	Decompress = defaultInstance.Decompress
)

Functions

This section is empty.

Types

type BrotliCompressor

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

func NewBrotliCompressor

func NewBrotliCompressor() *BrotliCompressor

func (BrotliCompressor) Compress

func (compressor BrotliCompressor) Compress(dst io.Writer, src []byte) (err error)

func (BrotliCompressor) Decompress

func (compressor BrotliCompressor) Decompress(dst io.Writer, src []byte) (err error)

type Compressor

type Compressor interface {
	Compress(dst io.Writer, src []byte) (err error)
	Decompress(dst io.Writer, src []byte) (err error)
}

Compressor represents compress interface

type GzipCompressor

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

func NewGzipCompressor

func NewGzipCompressor() *GzipCompressor

func (*GzipCompressor) Compress

func (c *GzipCompressor) Compress(dst io.Writer, src []byte) (err error)

func (*GzipCompressor) Decompress

func (c *GzipCompressor) Decompress(dst io.Writer, src []byte) (err error)

Jump to

Keyboard shortcuts

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