compress

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2018 License: GPL-3.0 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 level.
	DefaultCompression

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

	// SpeedCompression represents 'best for speed' stream compression level.
	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