@Override
    public void write(int b) throws IOException {
        throwIfClosed();
        inputBuffer[inputPosition++] = (byte) b;
        flushIfFull();
    }
@Test
    void output_stream_compresses_input() throws IOException {
        byte[] inputData = "The quick brown fox jumps over the lazy dog".getBytes();
        ByteArrayOutputStream arrayOut = new ByteArrayOutputStream();
        try (ZstdOutputStream zstdOut = new ZstdOutputStream(arrayOut, 12)) {
            zstdOut.write(inputData[0]);
            zstdOut.write(inputData, 1, inputData.length - 1);
        }
        byte[] compressedData = arrayOut.toByteArray();
        ZstdCompressor compressor = new ZstdCompressor();
        byte[] decompressedData = new byte[inputData.length];
        compressor.decompress(compressedData, 0, compressedData.length, decompressedData, 0, decompressedData.length);
        assertArrayEquals(inputData, decompressedData);
    }