Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Compressor ¶
type Compressor interface { Reset(to io.Writer) Write([]byte) (int, error) Flush() error Close() error }
Compressor implements a simple common interface across compressors. Note that some compressors require a call to Close to finalize the stream. They should have a wrapper type implemented in Flush.
type LZ4Maker ¶
type LZ4Maker struct{ Level }
func (LZ4Maker) Make ¶
func (l LZ4Maker) Make() Compressor
type Level ¶
type Level int
Level is a mapping for compression levels. Each Compressor may have its own way of mapping Level constants to internal values. User- facing code should select a Level from among the defined constants.
Level constants. To maintain backwards compatibility, new constants must be added at the end of the list.
type Maker ¶
type Maker interface {
Make() Compressor
}
type NoCompress ¶
NoCompress is a noop Compressor.
func (NoCompress) Close ¶
func (NoCompress) Close() error
Flush implements Compressor on NoCompress.
func (NoCompress) Flush ¶
func (NoCompress) Flush() error
func (*NoCompress) Reset ¶
func (n *NoCompress) Reset(to io.Writer)
Reset implements Compressor on NoCompress.
Click to show internal directories.
Click to hide internal directories.