.Dd $Mdocdate: November 11 2015 $ .Dt CMS_UNCOMPRESS 3 .Os .Sh NAME .Nm CMS_uncompress .Nd uncompress a CMS CompressedData structure .Sh SYNOPSIS .In openssl/cms.h .Ft int .Fo CMS_uncompress .Fa "CMS_ContentInfo *cms" .Fa "BIO *dcont" .Fa "BIO *out" .Fa "unsigned int flags" .Fc .Sh DESCRIPTION .Fn CMS_uncompress extracts and uncompresses the content from a CMS CompressedData structure .Fa cms . .Fa data is a .Vt BIO to write the content to and .Fa flags is an optional set of flags. .Pp The .Fa dcont parameter is used in the rare case where the compressed content is detached. It will normally be set to .Dv NULL . .Sh NOTES The only currently supported compression algorithm is zlib: if the structure indicates the use of any other algorithm, an error is returned. .Pp If zlib support is not compiled into OpenSSL, then .Fn CMS_uncompress will always return an error. .Pp The following flags can be passed in the .Fa flags parameter: .Pp If the .Dv CMS_TEXT flag is set, MIME headers for type .Sy text/plain are deleted from the content. If the content is not of type .Sy text/plain , then an error is returned. .Sh RETURN VALUES .Fn CMS_uncompress returns either 1 for success or 0 for failure. The error can be obtained from .Xr ERR_get_error 3 . .Sh SEE ALSO .Xr CMS_compress 3 , .Xr ERR_get_error 3 .Sh HISTORY .Fn CMS_uncompress was added to OpenSSL 0.9.8. .Sh BUGS The lack of single pass processing and the need to hold all data in memory as mentioned in .Xr CMS_verify 3 also applies to .Xr CMS_decompress 3 .