Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Compressor ¶
type Compressor struct {
// contains filtered or unexported fields
}
Compressor compresses data to zlib format at the specified level
func NewCompressor ¶
func NewCompressor(lvl int) (*Compressor, error)
NewCompressor returns a new Compressor used to compress data. Errors if out of memory or invalid lvl
func (*Compressor) Close ¶
func (c *Compressor) Close()
Close frees the memory allocated by C objects
func (*Compressor) Compress ¶
func (c *Compressor) Compress(in, out []byte) (int, []byte, error)
Compress compresses the data from in to out and returns the number of bytes written to out, out and an error if the out buffer was too short. If you pass nil for out, this function will allocate a fitting buffer and return it.
Click to show internal directories.
Click to hide internal directories.