B - the binary representation to compress.public interface Compressor<B>
| Modifier and Type | Method and Description |
|---|---|
String |
algorithm()
The name of the algorithm used.
|
B |
compress(B uncompressed)
Compresses a payload using the "legacy" format of protocol v4- frame bodies.
|
B |
compressWithoutLength(B uncompressed)
Compresses a payload using the "modern" format of protocol v5+ segments.
|
B |
decompress(B compressed)
Decompresses a payload that was compressed with
compress(Object). |
B |
decompressWithoutLength(B compressed,
int uncompressedLength)
Decompresses a payload that was compressed with
compressWithoutLength(Object). |
static <B> Compressor<B> |
none() |
static <B> Compressor<B> none()
String algorithm()
It's the string that will be used in the STARTUP message. Null or empty means no
compression.
B compress(B uncompressed)
The resulting payload encodes the uncompressed length, and is therefore self-sufficient for decompression.
B decompress(B compressed)
compress(Object).B compressWithoutLength(B uncompressed)
The resulting payload does not encode the uncompressed length. It must be stored separately, and provided to the decompression method.
B decompressWithoutLength(B compressed, int uncompressedLength)
compressWithoutLength(Object).Copyright © 2017–2022. All rights reserved.