Package io.airlift.compress.v3.lz4
Class Lz4NativeCompressor
java.lang.Object
io.airlift.compress.v3.lz4.Lz4NativeCompressor
- All Implemented Interfaces:
Compressor,Lz4Compressor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcompress(byte[] input, int inputOffset, int inputLength, byte[] output, int outputOffset, int maxOutputLength) intcompress(MemorySegment input, MemorySegment output) static booleanintmaxCompressedLength(int uncompressedSize) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.airlift.compress.v3.Compressor
getRetainedSizeInBytes
-
Constructor Details
-
Lz4NativeCompressor
public Lz4NativeCompressor() -
Lz4NativeCompressor
public Lz4NativeCompressor(int acceleration)
-
-
Method Details
-
isEnabled
public static boolean isEnabled() -
maxCompressedLength
public int maxCompressedLength(int uncompressedSize) - Specified by:
maxCompressedLengthin interfaceCompressor
-
compress
public int compress(byte[] input, int inputOffset, int inputLength, byte[] output, int outputOffset, int maxOutputLength) - Specified by:
compressin interfaceCompressor- Returns:
- number of bytes written to the output
-
compress
- Specified by:
compressin interfaceCompressor- Specified by:
compressin interfaceLz4Compressor- Returns:
- number of bytes written to the output
-