public final class ZstdEncoder
extends io.netty.handler.codec.MessageToByteEncoder<io.netty.buffer.ByteBuf>
ByteBuf using the Zstandard algorithm.
See Zstandard.| Constructor and Description |
|---|
ZstdEncoder()
Creates a new Zstd encoder.
|
ZstdEncoder(int compressionLevel)
Creates a new Zstd encoder.
|
ZstdEncoder(int blockSize,
int maxEncodeSize)
Creates a new Zstd encoder.
|
ZstdEncoder(int compressionLevel,
int blockSize,
int maxEncodeSize) |
| Modifier and Type | Method and Description |
|---|---|
protected io.netty.buffer.ByteBuf |
allocateBuffer(io.netty.channel.ChannelHandlerContext ctx,
io.netty.buffer.ByteBuf msg,
boolean preferDirect) |
protected void |
encode(io.netty.channel.ChannelHandlerContext ctx,
io.netty.buffer.ByteBuf in,
io.netty.buffer.ByteBuf out) |
void |
flush(io.netty.channel.ChannelHandlerContext ctx) |
void |
handlerAdded(io.netty.channel.ChannelHandlerContext ctx) |
void |
handlerRemoved(io.netty.channel.ChannelHandlerContext ctx) |
acceptOutboundMessage, isPreferDirect, writebind, close, connect, deregister, disconnect, readensureNotSharable, exceptionCaught, isSharablepublic ZstdEncoder()
ZstdEncoder(int,int) constructorpublic ZstdEncoder(int compressionLevel)
compressionLevel - specifies the level of the compressionpublic ZstdEncoder(int blockSize,
int maxEncodeSize)
blockSize - is used to calculate the compressionLevelmaxEncodeSize - specifies the size of the largest compressed objectpublic ZstdEncoder(int compressionLevel,
int blockSize,
int maxEncodeSize)
blockSize - is used to calculate the compressionLevelmaxEncodeSize - specifies the size of the largest compressed objectcompressionLevel - specifies the level of the compressionprotected io.netty.buffer.ByteBuf allocateBuffer(io.netty.channel.ChannelHandlerContext ctx,
io.netty.buffer.ByteBuf msg,
boolean preferDirect)
allocateBuffer in class io.netty.handler.codec.MessageToByteEncoder<io.netty.buffer.ByteBuf>protected void encode(io.netty.channel.ChannelHandlerContext ctx,
io.netty.buffer.ByteBuf in,
io.netty.buffer.ByteBuf out)
encode in class io.netty.handler.codec.MessageToByteEncoder<io.netty.buffer.ByteBuf>public void flush(io.netty.channel.ChannelHandlerContext ctx)
flush in interface io.netty.channel.ChannelOutboundHandlerflush in class io.netty.channel.ChannelOutboundHandlerAdapterpublic void handlerAdded(io.netty.channel.ChannelHandlerContext ctx)
handlerAdded in interface io.netty.channel.ChannelHandlerhandlerAdded in class io.netty.channel.ChannelHandlerAdapterCopyright © 2008–2024 The Netty Project. All rights reserved.