@Override
    public ByteArraySequence compress(@NotNull ByteArraySequence input,
                                      boolean mayReturnReusableBufferHint) throws IOException {
      try {
        LZ4Compressor compressor = CompressionUtil.compressor();

        int compressedLengthMax = compressor.maxCompressedLength(input.length());
        byte[] compressedBytes = mayReturnReusableBufferHint ?
                                 threadLocalBuffer.getBuffer(compressedLengthMax) :
                                 new byte[compressedLengthMax];
        int actualCompressedLength = compressor.compress(
          input.getInternalBuffer(), input.getOffset(), input.length(),
          compressedBytes, 0, compressedBytes.length
        );
        return new ByteArraySequence(compressedBytes, 0, actualCompressedLength);
      }
      catch (LZ4Exception e) {
        throw new IOException("Compressing " + input.length() + " bytes failed", e);
      }
    }
@Override
    public ByteArraySequence compress(@NotNull ByteArraySequence input,
                                      boolean mayReturnReusableBufferHint)