Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LZ4Compressor ¶
type LZ4Compressor struct{}
LZ4Compressor implements the gocql.Compressor interface and can be used to compress incoming and outgoing frames. According to the Cassandra docs the LZ4 protocol should be preferred over snappy. (For details refer to https://cassandra.apache.org/doc/latest/operating/compression.html)
Implementation note: Cassandra prefixes each compressed block with 4 bytes of the uncompressed block length, written in big endian order. But the LZ4 compression library github.com/pierrec/lz4/v4 does not expect the length field, so it needs to be added to compressed blocks sent to Cassandra, and removed from ones received from Cassandra before decompression.
func (LZ4Compressor) Name ¶
func (s LZ4Compressor) Name() string