Package flate
import "compress/flate"
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.
Package files
deflate.go huffman_bit_writer.go huffman_code.go inflate.go reverse_bits.go token.go util.goConstants
const (
NoCompression = 0
BestSpeed = 1
BestCompression = 9
DefaultCompression = -1
)
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.
type CorruptInputError
A CorruptInputError reports the presence of corrupt input at a given offset.
type CorruptInputError int64
func (CorruptInputError) String
func (e CorruptInputError) String() string
type InternalError
An InternalError reports an error in the flate code itself.
type InternalError string
func (InternalError) String
func (e InternalError) String() string
type ReadError
A ReadError reports an error encountered while reading input.
type ReadError struct {
Offset int64 // byte offset where error occurred
Error os.Error // error returned by underlying Read
}
func (*ReadError) String
func (e *ReadError) String() string
type Reader
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 Reader interface {
io.Reader
ReadByte() (c byte, err os.Error)
}
type WriteError
A WriteError reports an error encountered while writing output.
type WriteError struct {
Offset int64 // byte offset where error occurred
Error os.Error // error returned by underlying Read
}
func (*WriteError) String
func (e *WriteError) String() string
type WrongValueError
type WrongValueError struct {
// contains unexported fields
}
func (WrongValueError) String
func (err WrongValueError) String() string
