类 CompressionCodecZstd

java.lang.Object
org.apache.pulsar.common.compression.CompressionCodecZstd
所有已实现的接口:
CompressionCodec

public class CompressionCodecZstd extends Object implements CompressionCodec
Zstandard Compression.
  • 构造器详细资料

    • CompressionCodecZstd

      public CompressionCodecZstd()
  • 方法详细资料

    • 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 content
      uncompressedLength - 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