Interface ChunkCompressor
-
public interface ChunkCompressorInterface to compress a chunk of data.
-
-
Method Summary
Modifier and Type Method Description intcompress(ByteBuffer inUncompressed, ByteBuffer outCompressed)This method compresses the given data.ChunkCompressionTypecompressionType()The compression type of this compressor.intmaxCompressedSize(int uncompressedSize)
-
-
-
Method Detail
-
compress
int compress(ByteBuffer inUncompressed, ByteBuffer outCompressed) throws IOException
This method compresses the given data. The output compressed ByteBuffer is returned ready for read.- Parameters:
inUncompressed- Input data to be compressed.outCompressed- Output compressed data.- Returns:
- Size of the compressed output data.
- Throws:
IOException
-
maxCompressedSize
int maxCompressedSize(int uncompressedSize)
- Parameters:
uncompressedSize- the size of the uncompressed data.- Returns:
- the maximum compresses size for a given uncompressed size (may exceed the size of the data).
-
compressionType
ChunkCompressionType compressionType()
The compression type of this compressor. This may differ from the requested compression type if it has been upgraded.- Returns:
- this compressor's type
-
-