compress

package
v0.0.0-...-aeec266 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2021 License: BSD-3-Clause Imports: 2 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 interface {
	io.ReadWriter
}

Compressor represents a stream compression method.

type Level

type Level int

Level represents a stream compression level.

const (
	// NoCompression represents no stream compression.
	NoCompression Level = iota

	// DefaultCompression represents 'default' stream compression.
	DefaultCompression

	// BestCompression represents 'best for size' stream compression.
	BestCompression

	// SpeedCompression represents 'best for speed' stream compression.
	SpeedCompression
)

func (Level) String

func (cl Level) String() string

String returns CompressionLevel string representation.

type ZlibCompressor

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

ZlibCompressor represents zlib stream compressor.

func NewZlibCompressor

func NewZlibCompressor(reader io.Reader, writer io.Writer, level Level) *ZlibCompressor

NewZlibCompressor returns a new zlib compression method.

func (*ZlibCompressor) Read

func (z *ZlibCompressor) Read(p []byte) (int, error)

func (*ZlibCompressor) Write

func (z *ZlibCompressor) Write(p []byte) (int, error)

Jump to

Keyboard shortcuts

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