static ClickHouseOutputStream getRequestOutputStream(ClickHouseConfig config, OutputStream output,
            Runnable postCloseAction) {
        if (config == null) {
            return ClickHouseOutputStream.of(output, (int) ClickHouseClientOption.BUFFER_SIZE.getDefaultValue(),
                    ClickHouseCompression.NONE, ClickHouseConfig.DEFAULT_READ_COMPRESS_LEVEL, postCloseAction);
        }

        return ClickHouseOutputStream.of(output, config.getWriteBufferSize(), config.getRequestCompressAlgorithm(),
                config.getRequestCompressLevel(), postCloseAction);
    }
Gets wrapped output stream for writing data into request.

@param config          optional configuration
@param output          non-null output stream
@param postCloseAction custom action will be performed right after closing
                       the output stream
@return wrapped output, or the same output if it's instance of
        {@link ClickHouseOutputStream}
clickhouse-client/src/main/java/com/clickhouse/client/ClickHouseClient.java