Interface CompressionCodec
- All Known Implementing Classes:
AbstractCompressionCodec
,Lz4CompressionCodec
,NoCompressionCodec
,ZstdCompressionCodec
public interface CompressionCodec
The codec for compression/decompression.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Factory to create compression codec. -
Method Summary
Modifier and TypeMethodDescriptioncompress
(BufferAllocator allocator, ArrowBuf uncompressedBuffer) Compress a buffer.decompress
(BufferAllocator allocator, ArrowBuf compressedBuffer) Decompress a buffer.Gets the type of the codec.
-
Method Details
-
compress
Compress a buffer.- Parameters:
allocator
- the allocator for allocating memory for compressed buffer.uncompressedBuffer
- the buffer to compress. Implementation of this method should take care of releasing this buffer.- Returns:
- the compressed buffer
-
decompress
Decompress a buffer.- Parameters:
allocator
- the allocator for allocating memory for decompressed buffer.compressedBuffer
- the buffer to be decompressed. Implementation of this method should take care of releasing this buffer.- Returns:
- the decompressed buffer.
-
getCodecType
CompressionUtil.CodecType getCodecType()Gets the type of the codec.- Returns:
- the type of the codec.
-