Documentation ¶
Overview ¶
Package zlib implements the encoded.Codec interface to apply zlib compression to blobs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Codec ¶
type Codec struct {
// contains filtered or unexported fields
}
A Codec implements the encoded.Codec interface to provide zlib compression of blob data. A zero value is ready for use, but performs no compression. For most uses prefer NewCodec.
func NewCodec ¶
NewCodec returns a Codec using the specified compression level. Note that a zero level means no compression, not default compression.
func (Codec) DecodedLen ¶
DecodedLen reports the decoded length of src.
type Level ¶
type Level int
Level determines the compression level to use.
const ( LevelNone Level = flate.NoCompression LevelFastest Level = flate.BestSpeed LevelSmallest Level = flate.BestCompression LevelDefault Level = flate.DefaultCompression )
Compression level constants forwarded from compress/flate.
Click to show internal directories.
Click to hide internal directories.