Package io.airlift.compress.v3
Interface Compressor
- All Known Subinterfaces:
Lz4Compressor,SnappyCompressor,ZstdCompressor
- All Known Implementing Classes:
DeflateCompressor,Lz4JavaCompressor,Lz4NativeCompressor,LzoCompressor,SnappyJavaCompressor,SnappyNativeCompressor,ZstdJavaCompressor,ZstdNativeCompressor
public interface Compressor
-
Method Summary
Modifier and TypeMethodDescriptionintcompress(byte[] input, int inputOffset, int inputLength, byte[] output, int outputOffset, int maxOutputLength) intcompress(MemorySegment input, MemorySegment output) default intgetRetainedSizeInBytes(int inputLength) intmaxCompressedLength(int uncompressedSize)
-
Method Details
-
maxCompressedLength
int maxCompressedLength(int uncompressedSize) -
compress
int compress(byte[] input, int inputOffset, int inputLength, byte[] output, int outputOffset, int maxOutputLength) - Returns:
- number of bytes written to the output
-
compress
- Returns:
- number of bytes written to the output
-
getRetainedSizeInBytes
default int getRetainedSizeInBytes(int inputLength)
-