Read and extract the decompressed contents of a CMS compressed-data file.
Public Declare Function CMS_ReadComprData Lib "diCrPKI.dll" (ByVal strFileOut As String, ByVal strFileIn As String, ByVal nOptions As Long) As Long
nRet = CMS_ReadComprData(strFileOut, strFileIn, nOptions) As Long
long __stdcall CMS_ReadComprData(const char *szFileOut, const char *szFileIn, long nOptions);
If successful, the return value is the number of bytes in the output file; otherwise it returns a negative error code.
static int dipki::Cms::ReadComprData (const std::string &outputFile, const std::string &inputFile, ComprDataOptions opts=ComprDataOptions::Default_ComprDataOpt)
static Cms.read_comprdata(outputfile, inputfile, opts=ComprDataOpts.DEFAULT)
This will read and extract the contents of a CMS compressed-data file (conventionally saved with a .p7z extension)
which uses the zlibCompress
algorithm.
It only works in file-to-file mode.
Any existing file with the same name as the parameter szFileOut will be overwritten without warning.
Use the PKI_CMS_NO_INFLATE option to extract the compressed data as is without inflation.
See example in CMS_MakeComprData.