Interface BlockDecompressor

All Known Implementing Classes:
AirBlockDecompressor, Lz4BlockDecompressor

public interface BlockDecompressor
A decompressor which decompresses a block each time.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    decompress(byte[] src, int srcOff, int srcLen, byte[] dst, int dstOff)
    Decompress source data read from src and write the decompressed data to dst.
    int
    decompress(ByteBuffer src, int srcOff, int srcLen, ByteBuffer dst, int dstOff)
    Decompress source data read from (Buffer.position() + srcOff), and write the decompressed data to dst.
  • Method Details

    • decompress

      int decompress(ByteBuffer src, int srcOff, int srcLen, ByteBuffer dst, int dstOff) throws BufferDecompressionException
      Decompress source data read from (Buffer.position() + srcOff), and write the decompressed data to dst.
      Parameters:
      src - Compressed data to read from
      srcOff - The start offset of compressed data
      srcLen - The length of data which want to be decompressed
      dst - The target to write decompressed data
      dstOff - The start offset to write the decompressed data
      Returns:
      Length of decompressed data
      Throws:
      BufferDecompressionException - if exception thrown when decompressing
    • decompress

      int decompress(byte[] src, int srcOff, int srcLen, byte[] dst, int dstOff) throws BufferDecompressionException
      Decompress source data read from src and write the decompressed data to dst.
      Parameters:
      src - Compressed data to read from
      srcOff - The start offset of compressed data
      srcLen - The length of data which want to be decompressed
      dst - The target to write decompressed data
      dstOff - The start offset to write the decompressed data
      Returns:
      Length of decompressed data
      Throws:
      BufferDecompressionException - if exception thrown when decompressing