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 equals 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(). A memory area can be easily allocated with the AllocateMemory() function. 'CompressionLevel' is an optional value which can range from 0 (fastest, least compressed) to 9 (slowest, most compressed).
Note: The compression algorithm is relatively slow, however it produces excellent results (e.g. superior to .zip format) and decompression is extremely fast (faster than .zip).
Supported OS
All