static ClickHouseInputStream getResponseInputStream(ClickHouseConfig config, InputStream input,
            Runnable postCloseAction) {
        if (config == null) {
            return ClickHouseInputStream.of(input, ClickHouseDataConfig.getDefaultReadBufferSize(),
                    ClickHouseCompression.NONE, ClickHouseDataConfig.DEFAULT_READ_COMPRESS_LEVEL, postCloseAction);
        }

        return ClickHouseInputStream.of(input, config.getReadBufferSize(), config.getResponseCompressAlgorithm(),
                config.getResponseCompressLevel(), postCloseAction);
    }
Gets wrapped input stream for reading data from response.

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