Documentation
¶
Overview ¶
Package compression connects optional compression implementations to the driver.
Index ¶
Constants ¶
const ZstdLevel = 3
ZstdLevel is the fixed level used by the encoder and HandshakeResponse. Level 3 targets better compression and faster encoding/decoding than zlib on typical MySQL traffic, without requiring users to tune the level.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Codec ¶
Codec compresses and decompresses independent protocol packets. Both methods append to dst and must be safe for concurrent use. Decode must limit its output to cap(dst)-len(dst) bytes.
var Zstd Codec
Zstd is set by mysql/zstd during package initialization. It remains nil when that package is not imported. It must not be changed after initialization.