Secure Mime ContextCompress Method
Compress the specified stream.
Definition
Namespace: MimeKit.Cryptography
Assembly: MimeKit.Cryptography (in MimeKit.Cryptography.dll) Version: 5.0.0
A new ApplicationPkcs7Mime instance containing the compressed content.
Assembly: MimeKit.Cryptography (in MimeKit.Cryptography.dll) Version: 5.0.0
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
ApplicationPkcs7MimeA new ApplicationPkcs7Mime instance containing the compressed content.
Implements
ISecureMimeContextCompress(Stream, CancellationToken)Remarks
Compresses the specified stream.
Exceptions
| ArgumentNullException | stream is . |
| OperationCanceledException | The operation was canceled via the cancellation token. |
| CmsException | An error occurred in the cryptographic message syntax subsystem. |