public static ClickHouseInputStream of(InputStream input, int bufferSize, ClickHouseCompression compression,
            int compressionLevel, Runnable postCloseAction) {
        if (input == null) {
            return EmptyInputStream.INSTANCE;
        } else if (input != EmptyInputStream.INSTANCE && input instanceof ClickHouseInputStream) {
            return (ClickHouseInputStream) input;
        }
        return wrap(null, input, bufferSize, compression, compressionLevel, postCloseAction);
    }
Wraps the given input stream.

@param input            input stream
@param bufferSize       buffer size which is always greater than zero(usually
                        4096 or larger)
@param compression      compression algorithm, null or
                        {@link ClickHouseCompression#NONE} means no
                        compression
@param compressionLevel compression level
@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-data/src/main/java/com/clickhouse/data/ClickHouseInputStream.java