Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Compress ¶
Compress compresses src into dst, returning a slice pointing to the compressed data. If dst is nil, the maximum possible compressed length is allocated. Otherwise, if dst is too short, an error is returned.
func Uncompress ¶
Uncompress decompresses src into dst, returning a slice pointing to the decompressed data. If dst is too short, an error is returned.
Types ¶
type Error ¶
type Error struct {
// contains filtered or unexported fields
}
Error wraps a libz error code.
type ErrorCode ¶
type ErrorCode int32
ErrorCode is a return status for the compression functions. Negative values are errors, positive value are for special but normal events.
When used as an error, Z_OK is returned as nil.
type Level ¶
type Level int32
Level is a compression level.
Note that this doesn't match the levels in compress/flate since [LevelNoCompression] is zero, and there's no equivalent for huffman-only.