@Override
    public void write(int b) throws IOException {
        throwIfClosed();
        inputBuffer[inputPosition++] = (byte) b;
        flushIfFull();
    }
@Test
    void compressed_size_is_less_than_uncompressed() throws IOException {
        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();
        ByteArrayOutputStream arrayOut = new ByteArrayOutputStream();
        try (ZstdOutputStream zstdOut = new ZstdOutputStream(arrayOut)) {
            zstdOut.write(inputData);
        }
        int compressedSize = arrayOut.toByteArray().length;
        assertTrue(
                compressedSize < inputData.length,
                () -> "Compressed size is " + compressedSize + " while uncompressed size is " + inputData.length);
    }