ByteBuf using the FastLZ algorithm.
See FastLZ format.
| Modifier and Type | Field and Description |
|---|---|
| private final ByteBufChecksum | checksum
Underlying checksum calculator in use. |
| private final int | level
Compression level. |
| Access | Constructor and Description |
|---|---|
| public | FastLzFrameEncoder()
Creates a FastLZ encoder without checksum calculator and with auto detection of compression level. |
| public | FastLzFrameEncoder(int
supports only these values:
0 - Encoder will choose level automatically depending on the length of the input buffer.
1 - Level 1 is the fastest compression and generally useful for short data.
2 - Level 2 is slightly slower but it gives better compression ratio. level)Creates a FastLZ encoder with specified compression level and without checksum calculator. |
| public | FastLzFrameEncoder(boolean
If true, the checksum of each block will be calculated and this value
will be added to the header of block.
By default validateChecksums)FastLzFrameEncoder uses java.
for checksum calculation.Creates a FastLZ encoder with auto detection of compression level and calculation of checksums as specified. |
| public | FastLzFrameEncoder(int
supports only these values:
0 - Encoder will choose level automatically depending on the length of the input buffer.
1 - Level 1 is the fastest compression and generally useful for short data.
2 - Level 2 is slightly slower but it gives better compression ratio. level, Checksum the checksum)Checksum instance to use to check data for integrity.
You may set null if you don't want to validate checksum of each block.Creates a FastLZ encoder with specified compression level and checksum calculator. |
| Modifier and Type | Method and Description |
|---|---|
| protected void | encode(ChannelHandlerContext
the ctx, ByteBuf ChannelHandlerContext which this MessageToByteEncoder belongs tothe message to encode in, ByteBuf the out)ByteBuf into which the encoded message will be writtenImplements abstract io. ByteBuf.
|
| checksum | back to summary |
|---|---|
| private final ByteBufChecksum checksum Underlying checksum calculator in use. | |
| level | back to summary |
|---|---|
| private final int level Compression level. | |
| FastLzFrameEncoder | back to summary |
|---|---|
| public FastLzFrameEncoder() Creates a FastLZ encoder without checksum calculator and with auto detection of compression level. | |
| FastLzFrameEncoder | back to summary |
|---|---|
| public FastLzFrameEncoder(int level) Creates a FastLZ encoder with specified compression level and without checksum calculator.
| |
| FastLzFrameEncoder | back to summary |
|---|---|
| public FastLzFrameEncoder(boolean validateChecksums) Creates a FastLZ encoder with auto detection of compression level and calculation of checksums as specified.
| |
| FastLzFrameEncoder | back to summary |
|---|---|
| public FastLzFrameEncoder(int level, Checksum checksum) Creates a FastLZ encoder with specified compression level and checksum calculator.
| |
| encode | back to summary |
|---|---|
| protected void encode(ChannelHandlerContext ctx, ByteBuf in, ByteBuf out) throws Exception Implements abstract io. Doc from io. Encode a message into a
| |