Decompress data with TElMessageDecompressor
TElMessageDecompressor complements TElMessageCompressor which allows to quickly compress a piece of arbitrary data. Unlike ZIP components, TElMessageCompressor and TElMessageDecompressor work with uninterpreted streams or arrays of data, they accept and return PKCS#7 CompressedData structures.
Decompressing data with TElMessageDecompressor is a two-step procedure:
int res = decompressor.Decompress(compressedData, originalData);On completion, originalData contains the decompressed data. Always check the return value of the Decompress() method. The return value of 0 indicates successful completion of the method; any other value represents an error code.
Note that Decompress() method only accepts properly encoded PKCS#7 CompressedData messages, and can't be used with any other compressed format (such as ZIP, BZIP or 7Z).