Class LzmaFrameEncoder
- java.lang.Object
-
- io.netty.channel.ChannelHandlerAdapter
-
- io.netty.channel.ChannelOutboundHandlerAdapter
-
- io.netty.handler.codec.MessageToByteEncoder<io.netty.buffer.ByteBuf>
-
- io.netty.handler.codec.compression.LzmaFrameEncoder
-
- All Implemented Interfaces:
io.netty.channel.ChannelHandler,io.netty.channel.ChannelOutboundHandler
public class LzmaFrameEncoder extends io.netty.handler.codec.MessageToByteEncoder<io.netty.buffer.ByteBuf>Compresses aByteBufusing the LZMA algorithm. See LZMA and LZMA format or documents in LZMA SDK archive.
-
-
Constructor Summary
Constructors Constructor Description LzmaFrameEncoder()Creates LZMA encoder with default settings.LzmaFrameEncoder(int dictionarySize)LzmaFrameEncoder(int lc, int lp, int pb)LzmaFrameEncoder(int lc, int lp, int pb, int dictionarySize)Creates LZMA encoder with specifiedlc,lp,pbvalues and custom dictionary size.LzmaFrameEncoder(int lc, int lp, int pb, int dictionarySize, boolean endMarkerMode, int numFastBytes)Creates LZMA encoder with specified settings.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected io.netty.buffer.ByteBufallocateBuffer(io.netty.channel.ChannelHandlerContext ctx, io.netty.buffer.ByteBuf in, boolean preferDirect)protected voidencode(io.netty.channel.ChannelHandlerContext ctx, io.netty.buffer.ByteBuf in, io.netty.buffer.ByteBuf out)-
Methods inherited from class io.netty.handler.codec.MessageToByteEncoder
acceptOutboundMessage, isPreferDirect, write
-
Methods inherited from class io.netty.channel.ChannelOutboundHandlerAdapter
bind, close, connect, deregister, disconnect, flush, read
-
Methods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, exceptionCaught, handlerAdded, handlerRemoved, isSharable
-
-
-
-
Constructor Detail
-
LzmaFrameEncoder
public LzmaFrameEncoder()
Creates LZMA encoder with default settings.
-
LzmaFrameEncoder
public LzmaFrameEncoder(int lc, int lp, int pb)
-
LzmaFrameEncoder
public LzmaFrameEncoder(int dictionarySize)
-
LzmaFrameEncoder
public LzmaFrameEncoder(int lc, int lp, int pb, int dictionarySize)Creates LZMA encoder with specifiedlc,lp,pbvalues and custom dictionary size.
-
LzmaFrameEncoder
public LzmaFrameEncoder(int lc, int lp, int pb, int dictionarySize, boolean endMarkerMode, int numFastBytes)Creates LZMA encoder with specified settings.- Parameters:
lc- the number of "literal context" bits, available values [0, 8], default value 3.lp- the number of "literal position" bits, available values [0, 4], default value 0.pb- the number of "position" bits, available values [0, 4], default value 2.dictionarySize- available values [0,Integer.MAX_VALUE], default value is 65536.endMarkerMode- indicates shouldLzmaFrameEncoderuse end of stream marker or not. Note, thatLzmaFrameEncoderalways 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.numFastBytes- available values [5, 273].
-
-