java.lang.Object
net.jpountz.lz4.LZ4Compressor
org.elasticsearch.lz4.ESLZ4Compressor
public class ESLZ4Compressor
extends net.jpountz.lz4.LZ4Compressor
This file is forked from https://github.com/lz4/lz4-java. In particular, it forks the following file
net.jpountz.lz4.LZ4JavaSafeCompressor.
It modifies the original implementation to use custom LZ4SafeUtils and SafeUtils implementations which
include performance improvements. Additionally, instead of allocating a new hashtable for each compress
call, it reuses thread-local hashtables. Comments are included to mark the changes.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionintcompress(byte[] src, int srcOff, int srcLen, byte[] dest, int destOff, int maxDestLen) intcompress(ByteBuffer src, int srcOff, int srcLen, ByteBuffer dest, int destOff, int maxDestLen) Methods inherited from class net.jpountz.lz4.LZ4Compressor
compress, compress, compress, compress, compress, maxCompressedLength, toString
-
Field Details
-
INSTANCE
public static final net.jpountz.lz4.LZ4Compressor INSTANCE
-
-
Method Details
-
compress
public int compress(byte[] src, int srcOff, int srcLen, byte[] dest, int destOff, int maxDestLen) - Specified by:
compressin classnet.jpountz.lz4.LZ4Compressor
-
compress
public int compress(ByteBuffer src, int srcOff, int srcLen, ByteBuffer dest, int destOff, int maxDestLen) - Specified by:
compressin classnet.jpountz.lz4.LZ4Compressor
-