ByteBuf using the deflate algorithm.
| Modifier and Type | Field and Description |
|---|---|
| private volatile ChannelHandlerContext | |
| private volatile boolean | |
| private static final int | |
| private final int | |
| private final Deflater |
| Access | Constructor and Description |
|---|---|
| public | JZlibEncoder()
Creates a new zlib encoder with the default compression level ( |
| public | JZlibEncoder(int
1 yields the fastest compression and 9 yields the
best compression. 0 means no compression. The default
compression level is 6.Creates a new zlib encoder with the specified |
| public | JZlibEncoder(ZlibWrapper wrapper)
Creates a new zlib encoder with the default compression level ( |
| public | JZlibEncoder(ZlibWrapper wrapper, int
1 yields the fastest compression and 9 yields the
best compression. 0 means no compression. The default
compression level is 6.Creates a new zlib encoder with the specified |
| public | JZlibEncoder(ZlibWrapper wrapper, int
1 yields the fastest compression and 9 yields the
best compression. 0 means no compression. The default
compression level is 6.The base two logarithm of the size of the history buffer. The
value should be in the range windowBits, int 9 to 15 inclusive.
Larger values result in better compression at the expense of
memory usage. The default value is 15.How much memory should be allocated for the internal compression
state. memLevel)1 uses minimum memory and 9 uses maximum
memory. Larger values result in better and faster compression
at the expense of memory usage. The default value is 8Creates a new zlib encoder with the specified |
| public | JZlibEncoder(byte[]
the preset dictionary dictionary)Creates a new zlib encoder with the default compression level ( |
| public | JZlibEncoder(int
1 yields the fastest compression and 9 yields the
best compression. 0 means no compression. The default
compression level is 6.the preset dictionary dictionary)Creates a new zlib encoder with the specified |
| public | JZlibEncoder(int
1 yields the fastest compression and 9 yields the
best compression. 0 means no compression. The default
compression level is 6.The base two logarithm of the size of the history buffer. The
value should be in the range windowBits, int 9 to 15 inclusive.
Larger values result in better compression at the expense of
memory usage. The default value is 15.How much memory should be allocated for the internal compression
state. memLevel, byte[] 1 uses minimum memory and 9 uses maximum
memory. Larger values result in better and faster compression
at the expense of memory usage. The default value is 8the preset dictionary dictionary)Creates a new zlib encoder with the specified |
| Modifier and Type | Method and Description |
|---|---|
| public ChannelFuture | close()
Implements abstract io. ZlibEncoder and so finish the encoding.
|
| public ChannelFuture | close(final ChannelPromise promise)
Implements abstract io. ZlibEncoder and so finish the encoding.
|
| public void | close(final ChannelHandlerContext
the ctx, final ChannelPromise ChannelHandlerContext for which the close operation is madethe promise)ChannelPromise to notify once the operation completesOverrides io. Implements io. ChannelHandlerContext#close(ChannelPromise) to forward
to the next ChannelOutboundHandler in the ChannelPipeline.
|
| private ChannelHandlerContext | |
| 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 ChannelFuture | |
| public void | handlerAdded(ChannelHandlerContext ctx)
Overrides io. Implements io. ChannelHandler was added to the actual context and it's ready to handle events.
|
| public boolean | isClosed()
Implements abstract io. true if and only if the end of the compressed stream
has been reached.
|
| ctx | back to summary |
|---|---|
| private volatile ChannelHandlerContext ctx | |
| finished | back to summary |
|---|---|
| private volatile boolean finished | |
| THREAD_POOL_DELAY_SECONDS | back to summary |
|---|---|
| private static final int THREAD_POOL_DELAY_SECONDS | |
| wrapperOverhead | back to summary |
|---|---|
| private final int wrapperOverhead | |
| z | back to summary |
|---|---|
| private final Deflater z
Deprecated as a consequence of | |
| JZlibEncoder | back to summary |
|---|---|
| public JZlibEncoder() Creates a new zlib encoder with the default compression level (
| |
| JZlibEncoder | back to summary |
|---|---|
| public JZlibEncoder(int compressionLevel) Creates a new zlib encoder with the specified
| |
| JZlibEncoder | back to summary |
|---|---|
| public JZlibEncoder(ZlibWrapper wrapper) Creates a new zlib encoder with the default compression level (
| |
| JZlibEncoder | back to summary |
|---|---|
| public JZlibEncoder(ZlibWrapper wrapper, int compressionLevel) Creates a new zlib encoder with the specified
| |
| JZlibEncoder | back to summary |
|---|---|
| public JZlibEncoder(ZlibWrapper wrapper, int compressionLevel, int windowBits, int memLevel) Creates a new zlib encoder with the specified
| |
| JZlibEncoder | back to summary |
|---|---|
| public JZlibEncoder(byte[] dictionary) Creates a new zlib encoder with the default compression level (
| |
| JZlibEncoder | back to summary |
|---|---|
| public JZlibEncoder(int compressionLevel, byte[] dictionary) Creates a new zlib encoder with the specified
| |
| JZlibEncoder | back to summary |
|---|---|
| public JZlibEncoder(int compressionLevel, int windowBits, int memLevel, byte[] dictionary) Creates a new zlib encoder with the specified
| |
| close | back to summary |
|---|---|
| public ChannelFuture close() Implements abstract io. Doc from io. Close this
| |
| close | back to summary |
|---|---|
| public ChannelFuture close(final ChannelPromise promise) Implements abstract io. Doc from io. Close this
| |
| close | back to summary |
|---|---|
| public void close(final ChannelHandlerContext ctx, final ChannelPromise promise) Overrides io. Implements io. Doc from io. Calls
| |
| ctx | back to summary |
|---|---|
| private ChannelHandlerContext ctx() | |
| 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
| |
| finishEncode | back to summary |
|---|---|
| private ChannelFuture finishEncode(ChannelHandlerContext ctx, ChannelPromise promise) | |
| handlerAdded | back to summary |
|---|---|
| public void handlerAdded(ChannelHandlerContext ctx) throws Exception Overrides io. Implements io. Doc from io. Gets called after the
| |
| isClosed | back to summary |
|---|---|
| public boolean isClosed() Implements abstract io. Doc from io. Returns
| |