code: public void compress(ByteBuffer src, ByteBuffer dest) {
      final int compressedLength = compress(src, src.position(), src.remaining(), dest, dest.position(), dest.remaining());
      src.position(src.limit());
      dest.position(dest.position() + compressedLength);
    }
docs: Compresses <code>src</code> into <code>dest</code>. Calling this method
  will update the positions of both {@link ByteBuffer}s.
  
  @param src the source data
  @param dest the destination buffer
  @throws LZ4Exception if dest is too small