Interface ChunkDecompressor


  • public interface ChunkDecompressor
    Interface to decompress a chunk of data.
    • Method Detail

      • decompress

        int decompress​(ByteBuffer compressedInput,
                       ByteBuffer decompressedOutput)
                throws IOException
        This method decompresses chunk of data that was compressed using ChunkCompressor. Assumes that size of output ByteBuffer is large enough to de-compress the input.
        Parameters:
        compressedInput - Compressed data
        decompressedOutput - ByteBuffer where the decompressed data is put.
        Returns:
        Size of decompressed data.
        Throws:
        IOException
      • decompressedLength

        int decompressedLength​(ByteBuffer compressedInput)
                        throws IOException
        Returns the length in bytes of the decompressed chunk
        Parameters:
        compressedInput - compressed input
        Returns:
        the decompressed length in bytes, if known, otherwise -1
        Throws:
        IOException - if the buffer is not in the expected compressed format