Interface CompressionCodecFactory.BytesInputCompressor

Enclosing interface:
CompressionCodecFactory

public static interface CompressionCodecFactory.BytesInputCompressor
Compressor instance of a specific codec to be used for compressing page data.

This compressor shall be released after use. This compressor shall not be used after release.

See Also:
  • Method Details

    • compress

      BytesInput compress(BytesInput bytes) throws IOException
      Compresses the specified BytesInput data and returns it as BytesInput.

      Depending on the implementation bytes might be completely consumed. The returned BytesInput instance needs to be consumed before using this compressor again. This is because the implementation might use its internal buffer to directly provide the returned BytesInput instance.

      Parameters:
      bytes - the page data to be compressed
      Returns:
      a BytesInput containing the compressed data. Needs to be consumed before using this compressor again.
      Throws:
      IOException - if any I/O error occurs during the compression
    • getCodecName

      CompressionCodecName getCodecName()
      Returns the codec name of this compressor.
      Returns:
      the codec name
    • release

      void release()
      Releases this compressor instance.

      No subsequent calls on this instance nor the returned BytesInput instance returned by compress(BytesInput) shall be used after release.