Click or drag to resize
MimeKit

SecureMimeContextCompressAsync Method

Asynchronously compress the specified stream.

Namespace: MimeKit.Cryptography
Assembly: MimeKit (in MimeKit.dll) Version: 4.7.1
Syntax
C#
public virtual Task<ApplicationPkcs7Mime> CompressAsync(
	Stream stream,
	CancellationToken cancellationToken = default
)

Parameters

stream  Stream
The stream to compress.
cancellationToken  CancellationToken  (Optional)
The cancellation token.

Return Value

TaskApplicationPkcs7Mime
A new ApplicationPkcs7Mime instance containing the compressed content.

Implements

ISecureMimeContextCompressAsync(Stream, CancellationToken)
Exceptions
ExceptionCondition
ArgumentNullExceptionstream is null.
OperationCanceledException The operation was canceled via the cancellation token.
CmsException An error occurred in the cryptographic message syntax subsystem.
Remarks
Asynchronously compresses the specified stream.
See Also