CompressBrotliAsync Method
Definition
- Assemblies
- Cuemon.IO.dll
CompressBrotliAsync(IDecorator<Stream>, Action<AsyncStreamCompressionOptions>)
Compress the enclosed Stream of the specified decorator using the Brotli algorithm.
public static Task<Stream> CompressBrotliAsync(this IDecorator<Stream> decorator, Action<AsyncStreamCompressionOptions> setup = null)
Parameters
decoratorIDecorator<Stream>The IDecorator<T> to extend.
setupAction<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
decoratorcannot be null.- ArgumentException
The enclosed Stream of
decoratordoes not support write operations such as compression.