Interface ICompressor<T extends Buffer>
- Type Parameters:
T- The generic type of NIO buffer on which this compressor operates.
- All Known Implementing Classes:
GZip2Compressor,GZip2Compressor.ByteGZip2Compressor,GZip2Compressor.DoubleGZip2Compressor,GZip2Compressor.FloatGZip2Compressor,GZip2Compressor.IntGZip2Compressor,GZip2Compressor.LongGZip2Compressor,GZip2Compressor.ShortGZip2Compressor,GZipCompressor,GZipCompressor.ByteGZipCompressor,GZipCompressor.DoubleGZipCompressor,GZipCompressor.FloatGZipCompressor,GZipCompressor.IntGZipCompressor,GZipCompressor.LongGZipCompressor,GZipCompressor.ShortGZipCompressor,HCompressor,HCompressor.ByteHCompressor,HCompressor.DoubleHCompressor,HCompressor.FloatHCompressor,HCompressor.IntHCompressor,HCompressor.ShortHCompressor,NoCompressCompressor,NoCompressCompressor.ByteNoCompressCompressor,NoCompressCompressor.DoubleNoCompressCompressor,NoCompressCompressor.FloatNoCompressCompressor,NoCompressCompressor.IntNoCompressCompressor,NoCompressCompressor.LongNoCompressCompressor,NoCompressCompressor.ShortNoCompressCompressor,PLIOCompress.BytePLIOCompressor,PLIOCompress.IntPLIOCompressor,PLIOCompress.ShortPLIOCompressor,QuantizeProcessor.DoubleQuantCompressor,QuantizeProcessor.FloatQuantCompressor,RiceCompressor,RiceCompressor.ByteRiceCompressor,RiceCompressor.DoubleRiceCompressor,RiceCompressor.FloatRiceCompressor,RiceCompressor.IntRiceCompressor,RiceCompressor.ShortRiceCompressor
public interface ICompressor<T extends Buffer>
(for internal use) Compressor that can compress a Buffer into a ByteBuffer and vize versa. the Byte buffer
must have enough space allocated else an exception will be thrown.
-
Method Summary
Modifier and TypeMethodDescriptionbooleancompress(T buffer, ByteBuffer compressed) compress the buffer into the byte buffer.voiddecompress(ByteBuffer compressed, T buffer) Decompress the byte buffer and restore the buffer from it, again enough space must already be allocated.
-
Method Details
-
compress
compress the buffer into the byte buffer. Attention enough space must already be allocated.- Parameters:
buffer- the buffer to compress.compressed- the compressed data- Returns:
- true if the compression succeeded.
-
decompress
Decompress the byte buffer and restore the buffer from it, again enough space must already be allocated.- Parameters:
compressed- the compressed databuffer- the buffer to fill with the uncompressed data.
-