compressor

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 31, 2022 License: MIT Imports: 3 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 struct {
	BufSize   int
	NewWriter func(io.Writer) io.WriteCloser
	NewReader func(io.Reader) (io.ReadCloser, error)
}

Compressor is a common interface for all compressions.

func (*Compressor) Compress

func (c *Compressor) Compress(src []byte) []byte

Compress encodes the raw bytes.

func (*Compressor) Decompress

func (c *Compressor) Decompress(src []byte) ([]byte, error)

Decompress decodes the encoded bytes.

Jump to

Keyboard shortcuts

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