ByteBuf using the LZMA algorithm.
See LZMA
and LZMA format
or documents in LZMA SDK archive.
| Modifier and Type | Field and Description |
|---|---|
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private final Encoder | encoder
Underlying LZMA encoder in use. |
| private final int | littleEndianDictionarySize
Dictionary Size is stored as an unsigned 32-bit little endian integer. |
| private static final InternalLogger | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private final byte | properties
The Properties field contains three properties which are encoded using the following formula:
|
| private static boolean | warningLogged
For log warning only once. |
| Access | Constructor and Description |
|---|---|
| public | |
| public | LzmaFrameEncoder(int lc, int lp, int pb)
Creates LZMA encoder with specified |
| public | LzmaFrameEncoder(int dictionarySize)
Creates LZMA encoder with specified dictionary size and default values of
|
| public | LzmaFrameEncoder(int lc, int lp, int pb, int dictionarySize)
Creates LZMA encoder with specified |
| public | LzmaFrameEncoder(int
the number of "literal context" bits, available values [0, 8], default value 3. lc, int the number of "literal position" bits, available values [0, 4], default value 0. lp, int the number of "position" bits, available values [0, 4], default value 2. pb, int available values [0, dictionarySize, boolean java.],
default value is 65536.indicates should endMarkerMode, int LzmaFrameEncoder use end of stream marker or not.
Note, that LzmaFrameEncoder always sets size of uncompressed data
in LZMA header, so EOS marker is unnecessary. But you may use it for
better portability. For full description see "LZMA Decoding modes" section
of LZMA-Specification.txt in official LZMA SDK.available values [5, 273]. numFastBytes)Creates LZMA encoder with specified settings. |
| Modifier and Type | Method and Description |
|---|---|
| protected ByteBuf | allocateBuffer(ChannelHandlerContext ctx, ByteBuf in, boolean preferDirect)
Overrides io. ByteBuf which will be used as argument of encode(ChannelHandlerContext, I, ByteBuf).
|
| 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.
|
| private static int | maxOutputBufferLength(int inputLength)
Calculates maximum possible size of output buffer for not compressible data. |
| DEFAULT_LC | back to summary |
|---|---|
| private static final int DEFAULT_LC | |
| DEFAULT_LP | back to summary |
|---|---|
| private static final int DEFAULT_LP | |
| DEFAULT_MATCH_FINDER | back to summary |
|---|---|
| private static final int DEFAULT_MATCH_FINDER | |
| DEFAULT_PB | back to summary |
|---|---|
| private static final int DEFAULT_PB | |
| encoder | back to summary |
|---|---|
| private final Encoder encoder Underlying LZMA encoder in use. | |
| littleEndianDictionarySize | back to summary |
|---|---|
| private final int littleEndianDictionarySize Dictionary Size is stored as an unsigned 32-bit little endian integer. | |
| logger | back to summary |
|---|---|
| private static final InternalLogger logger | |
| MAX_FAST_BYTES | back to summary |
|---|---|
| private static final int MAX_FAST_BYTES | |
| MEDIUM_DICTIONARY_SIZE | back to summary |
|---|---|
| private static final int MEDIUM_DICTIONARY_SIZE | |
| MEDIUM_FAST_BYTES | back to summary |
|---|---|
| private static final int MEDIUM_FAST_BYTES | |
| MIN_FAST_BYTES | back to summary |
|---|---|
| private static final int MIN_FAST_BYTES | |
| properties | back to summary |
|---|---|
| private final byte properties The Properties field contains three properties which are encoded using the following formula:
| |
| warningLogged | back to summary |
|---|---|
| private static boolean warningLogged For log warning only once. | |
| LzmaFrameEncoder | back to summary |
|---|---|
| public LzmaFrameEncoder() Creates LZMA encoder with default settings. | |
| LzmaFrameEncoder | back to summary |
|---|---|
| public LzmaFrameEncoder(int lc, int lp, int pb) Creates LZMA encoder with specified | |
| LzmaFrameEncoder | back to summary |
|---|---|
| public LzmaFrameEncoder(int dictionarySize) Creates LZMA encoder with specified dictionary size and default values of
| |
| LzmaFrameEncoder | back to summary |
|---|---|
| public LzmaFrameEncoder(int lc, int lp, int pb, int dictionarySize) Creates LZMA encoder with specified | |
| LzmaFrameEncoder | back to summary |
|---|---|
| public LzmaFrameEncoder(int lc, int lp, int pb, int dictionarySize, boolean endMarkerMode, int numFastBytes) Creates LZMA encoder with specified settings.
| |
| allocateBuffer | back to summary |
|---|---|
| protected ByteBuf allocateBuffer(ChannelHandlerContext ctx, ByteBuf in, boolean preferDirect) throws Exception Overrides io. Doc from io. Allocate a
| |
| 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
| |
| maxOutputBufferLength | back to summary |
|---|---|
| private static int maxOutputBufferLength(int inputLength) Calculates maximum possible size of output buffer for not compressible data. | |