Table of Contents

CompressGZip Method

Definition

Namespace
Cuemon.IO
Assemblies
Cuemon.IO.dll
Source
src/Cuemon.IO/Extensions/StreamDecoratorExtensions.cs

CompressGZip(IDecorator<Stream>, Action<StreamCompressionOptions>)

Compress the enclosed Stream of the specified decorator using the GZip algorithm.

public static Stream CompressGZip(this IDecorator<Stream> decorator, Action<StreamCompressionOptions> setup = null)

Parameters

decorator IDecorator<Stream>

The IDecorator<T> to extend.

setup Action<StreamCompressionOptions>

The StreamCompressionOptions which may be configured.

Returns

Stream

A compressed version of the enclosed Stream of the specified decorator.

Exceptions

ArgumentNullException

decorator cannot be null.

ArgumentException

The enclosed Stream of decorator does not support write operations such as compression.