<PackageReference Include="BouncyCastle.Cryptography" Version="2.8.0-beta.349" />

Org.BouncyCastle.Cms.CmsCompressedData

public class CmsCompressedData
Represents a CMS CompressedData message. Parse an encoded message, then decompress via GetContent or GetContentStream.

Gets the content type of the encapsulated content before compression.

Gets the underlying ASN.1 CompressedData structure.

public ContentInfo ContentInfo { get; }

Gets the CMS ContentInfo wrapper for this message.

Gets the outer CMS ContentInfo content type (compressed-data).

public CmsCompressedData(byte[] compressedData)

Creates an instance from an encoded CompressedData message.

public CmsCompressedData(Stream compressedDataStream)

Creates an instance from an encoded CompressedData message.

public CmsCompressedData(ContentInfo contentInfo)

Creates an instance from a parsed CMS ContentInfo structure.

public byte[] GetContent()

Returns the decompressed content.

public byte[] GetContent(int limit)

Returns the decompressed content, throwing if the uncompressed size would exceed limit.

Returns a typed stream over the decompressed content.

public byte[] GetEncoded()

Returns the DER encoding of this message.