Class ESLZ4Compressor

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
    Modifier and Type
    Field
    Description
    static final net.jpountz.lz4.LZ4Compressor
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    compress(byte[] src, int srcOff, int srcLen, byte[] dest, int destOff, int maxDestLen)
     
    int
    compress(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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • 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:
      compress in class net.jpountz.lz4.LZ4Compressor
    • compress

      public int compress(ByteBuffer src, int srcOff, int srcLen, ByteBuffer dest, int destOff, int maxDestLen)
      Specified by:
      compress in class net.jpountz.lz4.LZ4Compressor