UnZipRawMemory

This function is used to unzip and decrypt raw memory, for example from resource.

OutputVar := UnZipRawMemory(AddressOrBufferObject, Size, Password)
Function Example: MyBuffer := UnZipRawMemory(resourceBuffer)

Parameters

OutputVar

The name of the variable in which to store the creted Buffer object containing unzipped memory.

AddressOrBuffer

Buffer object or pointer/address to raw zipped memory.

Size (optional)

Size in bytes of zipped memory. Not required if AddressOrBuffer is Buffer Object

Password (optional)

The password to use to decrypt the data.

Remarks

Ahk2Exe uses ZipRawMemory to compress and encrypt resources in raw mode (only 1 file/string/buffer is supported).
Internally AutoHotkey is able to decompress raw resources automatically (compiled script, AutoHotkey.dll, WinApi + lib resources). This function can be used in script to decrypt and decompress raw resources.

Related

ZipRawMemory, ZipCreateFile, ZipAddFile, ZipCloseFile, ZipOptions, UnZip, ZipCreateBuffer, ZipAddBuffer, ZipCloseBuffer, UnZipBuffer, ZipInfo, ZipAddFolder

Examples

MyBuffer:=ResGet(A_AhkPath,"AHKEXEC.AHK","LIB")
data:=UnZipRawMemory(MyBuffer)
MsgBox StrGet(data, "UTF-8")