Result = CompressMemory(*Buffer, Size, *Output, OutputSize [, Plugin [, Level]])Description
Compress the buffer content into the output buffer. The output buffer length needs to be at least as long as the buffer to compress.
*Buffer The memory buffer to compress. Size The size of the memory to compress. *Output The memory buffer to store the compressed data. OutputSize The memory buffer size to store the compressed data. Plugin (optional) The plugin to use, if more than one packer plugin has been registered. It can be one of the following value:#PB_PackerPlugin_BriefLZ: use the BriefLZ packer to compress the memory. UseBriefLZPacker() has to be called to register the plugin. #PB_PackerPlugin_Zip : use the Zip packer to compress the memory. UseZipPacker() has to be called to register the plugin. #PB_PackerPlugin_LZMA : use the LZMA packer to compress the memory. UseLZMAPacker() has to be called to register the plugin. Level (optional) The compression level to use. It is an integer value ranging from 0 (lower compression ratio, faster compression) to 9 (higher compression ratio, slower compression).
Return the compressed size if the buffer has been successfully compressed, zero otherwise. If the buffer data can't be compressed (already compressed data generally don't compress anymore), it will return zero.