A compressor that uses the LZ4 compression library.

Note
This compressor requires the lz4-ruby gem (v0.3.2 or later required).
Note
No need to instantiate this class manually, use compression: :lz4 option when calling Cassandra.cluster and one will be created automatically for you.

Inherits

Methods

self.

new

(min_size = 64)

Returns a new instance of Lz4

Parameters:
Name Type Details
min_size Integer (defaults to: 64) (64) Don’t compress frames smaller than this size (see #compress?).

algorithm

Returns 'lz4'

Returns:
Type Details
String 'lz4'

compress?

(str)

Returns will return false for frames smaller than the min_size given to the constructor.

Returns:
Type Details
(true or false) will return false for frames smaller than the min_size given to the constructor.
See Also:
  • Cassandra::Compression::Compressor#compress?

compress

(str)
See Also:
  • Cassandra::Compression::Compressor#compress

decompress

(str)
See Also:
  • Cassandra::Compression::Compressor#decompress