code: public int compress(ByteBuffer src, int srcOff, int srcLen, ByteBuffer dest, int destOff, int maxDestLen) {
      final int compressedLength = compressor.compress(src, srcOff, srcLen, dest, destOff + 4, maxDestLen - 4);
      putOriginalLength(dest, destOff, srcLen);
      return compressedLength + 4;
    }
docs: Compresses <code>src[srcOff:srcOff+srcLen]</code> into
  <code>dest[destOff:destOff+maxDestLen]</code> and returns the compressed
  length.
  
  This method will throw a {@link LZ4Exception} if this compressor is unable
  to compress the input into less than <code>maxDestLen</code> bytes. To
  prevent this exception to be thrown, you should make sure that
  <code>maxDestLen &gt;= maxCompressedLength(srcLen)</code>.
  
  {@link ByteBuffer} positions remain unchanged.
  
  @param src the source data
  @param srcOff the start offset in src
  @param srcLen the number of bytes to compress
  @param dest the destination buffer
  @param destOff the start offset in dest
  @param maxDestLen the maximum number of bytes to write in dest
  @throws LZ4Exception if maxDestLen is too small
  @return the compressed size