@Override
  protected int compressNative(ByteBuffer sourceData, int sourceDataOffset, int sourceDataSize,
      ByteBuffer compressedBuffer, int compressedBufferOffset, int compressedBufferSize) throws CompressionException {
    try {
      return getCompressor().compress(sourceData, sourceDataOffset, sourceDataSize, compressedBuffer,
          compressedBufferOffset, compressedBufferSize);
    } catch (Exception ex) {
      throw new CompressionException(String.format("LZ4 compression failed. sourceData.limit=%d, sourceDataOffset=%d, "
              + "sourceDataSize=%d, compressedBuffer.capacity=%d, compressedBufferOffset=%d, compressedBufferSize=%d",
          sourceData.limit(), sourceDataOffset, sourceDataSize, compressedBuffer.capacity(), compressedBufferOffset,
          compressedBufferSize), ex);
    }
  }
Invoke the LZ4 compression algorithm given the source data, offset, and size.
The compression output is stored in the compressed buffer at the specific offset.
All parameters have been verified before calling so implementation can skip verification.

@param sourceData The source uncompressed data.  It has already been null and empty verified.
@param sourceDataOffset Offset in sourceData to start reading.
@param sourceDataSize Number of bytes in sourceData to compress.
@param compressedBuffer  The buffer to hold the compressed data.
@param compressedBufferOffset The offset in compressedBuffer where the compression output should write.
@param compressedBufferSize Size of the buffer where compression can write to.  This size should be same as
                            estimateMaxCompressedDataSize().
@return The size of the compressed data in bytes.
ambry-commons/src/main/java/com/github/ambry/compression/LZ4Compression.java