public byte[] compress(byte[] input, int inputOffset, int inputLength) {
        int maxCompressedLength = getMaxCompressedLength(inputLength);
        byte[] output = new byte[maxCompressedLength];
        int compressedLength = compress(input, inputOffset, inputLength, output, 0, maxCompressedLength);
        return Arrays.copyOf(output, compressedLength);
    }
@Test
    void compressed_size_is_less_than_uncompressed() {
        StringBuilder builder = new StringBuilder();
        for (int i = 0; i < 100; i++) {
            builder.append("The quick brown fox jumps over the lazy dog").append('\n');
        }
        byte[] inputData = builder.toString().getBytes();
        ZstdCompressor compressor = new ZstdCompressor();
        byte[] compressedData = compressor.compress(inputData, 0, inputData.length);
        assertTrue(
                compressedData.length < inputData.length,
                () -> "Compressed size is " + compressedData.length + " while uncompressed size is " + inputData.length);
    }