flate

package
v0.0.0-...-90c9d3a Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2010 License: BSD-3-Clause, GooglePatentClause Imports: 6 Imported by: 0

Documentation

Overview

The flate package implements the DEFLATE compressed data format, described in RFC 1951. The gzip and zlib packages implement access to DEFLATE-based file formats.

Index

Constants

View Source
const (
	NoCompression = 0
	BestSpeed     = 1

	BestCompression    = 9
	DefaultCompression = -1
)

Variables

This section is empty.

Functions

func NewDeflater

func NewDeflater(w io.Writer, level int) io.WriteCloser

func NewInflater

func NewInflater(r io.Reader) io.ReadCloser

NewInflater returns a new ReadCloser that can be used to read the uncompressed version of r. It is the caller's responsibility to call Close on the ReadCloser when finished reading.

Types

type CorruptInputError

type CorruptInputError int64

A CorruptInputError reports the presence of corrupt input at a given offset.

func (CorruptInputError) String

func (e CorruptInputError) String() string

type InternalError

type InternalError string

An InternalError reports an error in the flate code itself.

func (InternalError) String

func (e InternalError) String() string

type ReadError

type ReadError struct {
	Offset int64    // byte offset where error occurred
	Error  os.Error // error returned by underlying Read
}

A ReadError reports an error encountered while reading input.

func (*ReadError) String

func (e *ReadError) String() string

type Reader

type Reader interface {
	io.Reader
	ReadByte() (c byte, err os.Error)
}

The actual read interface needed by NewInflater. If the passed in io.Reader does not also have ReadByte, the NewInflater will introduce its own buffering.

type WriteError

type WriteError struct {
	Offset int64    // byte offset where error occurred
	Error  os.Error // error returned by underlying Read
}

A WriteError reports an error encountered while writing output.

func (*WriteError) String

func (e *WriteError) String() string

type WrongValueError

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

func (WrongValueError) String

func (err WrongValueError) String() string

Jump to

Keyboard shortcuts

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