public static class ICompressor.GZIPCompressor extends Object implements ICompressor
ICompressor.GZIPCompress, ICompressor.GZIPCompressor, ICompressor.IOTDBLZ4Compressor, ICompressor.NoCompressor, ICompressor.SnappyCompressor| Constructor and Description |
|---|
GZIPCompressor() |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
compress(byte[] data) |
byte[] |
compress(byte[] data,
int offset,
int length)
abstract method of compress.
|
int |
compress(byte[] data,
int offset,
int length,
byte[] compressed)
abstract method of compress.
|
int |
compress(ByteBuffer data,
ByteBuffer compressed)
If the data is large, this function is better than byte[].
|
int |
getMaxBytesForCompression(int uncompressedDataSize)
Get the maximum byte size needed for compressing data of the given byte size.
|
CompressionType |
getType() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetCompressor, getCompressorpublic byte[] compress(byte[] data)
throws IOException
compress in interface ICompressorIOExceptionpublic byte[] compress(byte[] data,
int offset,
int length)
throws IOException
ICompressorcompress in interface ICompressorIOExceptionpublic int compress(byte[] data,
int offset,
int length,
byte[] compressed)
throws IOException
ICompressorcompress in interface ICompressorGZIPCompressOverflowException - if compressed byte array is too small.IOExceptionpublic int compress(ByteBuffer data, ByteBuffer compressed) throws IOException
ICompressorcompress in interface ICompressordata - MUST be DirectByteBuffer for Snappy.compressed - MUST be DirectByteBuffer for Snappy.GZIPCompressOverflowException - if compressed ByteBuffer is too small.IOExceptionpublic int getMaxBytesForCompression(int uncompressedDataSize)
ICompressorGZIPCompressOverflowExceptiongetMaxBytesForCompression in interface ICompressoruncompressedDataSize - byte size of the data to compresspublic CompressionType getType()
getType in interface ICompressorCopyright © 2022 The Apache Software Foundation. All rights reserved.