PackMemory()
Syntax
Result = PackMemory(SourceMemoryID, DestinationMemoryID, SourceLength [, CompressionLevel])Description
Pack the content of the SourceMemory area into the DestinationMemory area. The destinatation area must be at least the length of the Source area + 8. If Result is 0, the compression has failed (or the file is not compressible with this alogrythm), else it's the compressed size of the Destination area. The compressed data can be unpacked with UnpackMemory(). For advanced users, a callback can be added to follow the packing progress with PackerCallback(). Memory area can be easily allocated with the AllocateMemory() command. 'CompressionLevel' is an optional value which can be from 0 (fastest compression, less efficient) to 9 (slowest compression, very efficient).
Note : The compression algorythm is currently a bit slow but it give very good result (superior to .zip format) and best of all, is lightning fast to decompress (much faster than .zip).
Supported OS
Windows, Linux, MacOS X