Click or drag to resize
MimeKit

SecureMimeContextCompress Method

Compress the specified stream.

Namespace: MimeKit.Cryptography
Assembly: MimeKit (in MimeKit.dll) Version: 4.10.0
Syntax
C#
public virtual ApplicationPkcs7Mime Compress(
	Stream stream,
	CancellationToken cancellationToken = default
)

Parameters

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

Return Value

ApplicationPkcs7Mime
A new ApplicationPkcs7Mime instance containing the compressed content.

Implements

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