[#CMS_compress]
= CMS&lowbar;compress
:mrdocs:

Create a CMS CompressedData ContentInfo from content read from a BIO&period;

== Synopsis

Declared in `&lt;openssl&sol;cms&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:CMS_ContentInfo.adoc[CMS&lowbar;ContentInfo]*
CMS&lowbar;compress(
    xref:BIO.adoc[BIO]* in,
    int comp&lowbar;nid,
    unsigned int flags);
----

== Return Value

New CMS&lowbar;ContentInfo on success, or NULL on error&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *in*
| Content to compress (ignored for reading when CMS&lowbar;STREAM is set)&period;
| *comp&lowbar;nid*
| Compression algorithm NID, or NID&lowbar;undef for the default (zlib)&period;
| *flags*
| Optional CMS flags such as CMS&lowbar;TEXT, CMS&lowbar;BINARY, CMS&lowbar;STREAM, or CMS&lowbar;DETACHED&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
