Table of Contents

CompressDeflateAsync Method

Definition

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

CompressDeflateAsync(IDecorator<Stream>, Action<AsyncStreamCompressionOptions>)

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

public static Task<Stream> CompressDeflateAsync(this IDecorator<Stream> decorator, Action<AsyncStreamCompressionOptions> setup = null)

Parameters

decorator IDecorator<Stream>

The IDecorator<T> to extend.

setup Action<AsyncStreamCompressionOptions>

The AsyncStreamCompressionOptions which may be configured.

Returns

Task<Stream>

A task that represents the asynchronous operation. The task result contains 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.