Package org.apache.iotdb.tsfile.compress
Interface IUnCompressor
-
- All Known Implementing Classes:
IUnCompressor.GZIPUnCompressor,IUnCompressor.LZ4UnCompressor,IUnCompressor.LZMA2UnCompressor,IUnCompressor.NoUnCompressor,IUnCompressor.SnappyUnCompressor,IUnCompressor.ZstdUnCompressor
public interface IUnCompressoruncompress data according to type in metadata.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classIUnCompressor.GZIPUnCompressorstatic classIUnCompressor.LZ4UnCompressorstatic classIUnCompressor.LZMA2UnCompressorstatic classIUnCompressor.NoUnCompressorstatic classIUnCompressor.SnappyUnCompressorstatic classIUnCompressor.ZstdUnCompressor
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description CompressionTypegetCodecName()intgetUncompressedLength(byte[] array, int offset, int length)intgetUncompressedLength(ByteBuffer buffer)get the uncompressed length.static IUnCompressorgetUnCompressor(CompressionType name)get the UnCompressor based on the CompressionType.byte[]uncompress(byte[] byteArray)uncompress the byte array.intuncompress(byte[] byteArray, int offset, int length, byte[] output, int outOffset)uncompress the byte array.intuncompress(ByteBuffer compressed, ByteBuffer uncompressed)if the data is large, using this function is better.
-
-
-
Method Detail
-
getUnCompressor
static IUnCompressor getUnCompressor(CompressionType name)
get the UnCompressor based on the CompressionType.- Parameters:
name- CompressionType- Returns:
- the UnCompressor of specified CompressionType
-
getUncompressedLength
int getUncompressedLength(byte[] array, int offset, int length) throws IOException- Throws:
IOException
-
getUncompressedLength
int getUncompressedLength(ByteBuffer buffer) throws IOException
get the uncompressed length.- Parameters:
buffer- MUST be DirectByteBuffer- Throws:
IOException
-
uncompress
byte[] uncompress(byte[] byteArray) throws IOExceptionuncompress the byte array.- Parameters:
byteArray- to be uncompressed bytes- Returns:
- bytes after uncompressed
- Throws:
IOException
-
uncompress
int uncompress(byte[] byteArray, int offset, int length, byte[] output, int outOffset) throws IOExceptionuncompress the byte array.- Parameters:
byteArray- -to be uncompressed bytesoffset- -offsetlength- -lengthoutput- -output byteoutOffset- -- Returns:
- the valid length of the output array
- Throws:
IOException
-
uncompress
int uncompress(ByteBuffer compressed, ByteBuffer uncompressed) throws IOException
if the data is large, using this function is better.- Parameters:
compressed- MUST be DirectByteBufferuncompressed- MUST be DirectByteBuffer- Throws:
IOException
-
getCodecName
CompressionType getCodecName()
-
-