CompressMemory()
Syntax
Result = CompressMemory(*Buffer, Size, *Output, OutputSize [, Plugin])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.
Parameters
*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 have any effect. #PB_PackerPlugin_Zip : use the Zip packer to compress the memory. UseZipPacker() has to be called to have any effect. #PB_PackerPlugin_LZMA : use the LZMA packer to compress the memory. UseLZMAPacker() has to be called to have any effect.
Return value
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.
See Also
UncompressMemory()
Supported OS
All