类 CompressionCodecLZ4
java.lang.Object
org.apache.pulsar.common.compression.CompressionCodecLZ4
- 所有已实现的接口:
CompressionCodec
LZ4 Compression.
-
构造器概要
构造器 -
方法概要
-
构造器详细资料
-
CompressionCodecLZ4
public CompressionCodecLZ4()
-
-
方法详细资料
-
encode
public io.netty.buffer.ByteBuf encode(io.netty.buffer.ByteBuf source) 从接口复制的说明:CompressionCodec
Compress a buffer.- 指定者:
encode
在接口中CompressionCodec
- 参数:
source
- a buffer with the uncompressed content. The reader/writer indexes will not be modified- 返回:
- a new buffer with the compressed content. The buffer needs to be released by the receiver
-
decode
public io.netty.buffer.ByteBuf decode(io.netty.buffer.ByteBuf encoded, int uncompressedLength) throws IOException 从接口复制的说明:CompressionCodec
Decompress a buffer.The buffer needs to have been compressed with the matching Encoder.
- 指定者:
decode
在接口中CompressionCodec
- 参数:
encoded
- the compressed contentuncompressedLength
- the size of the original content- 返回:
- a ByteBuf with the compressed content. The buffer needs to be released by the receiver
- 抛出:
IOException
- if the decompression fails
-