UnZipRawMemory

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

OutputVar := UnZipRawMemory(Address, Size, , VariableOrAddress, Password)
Command  Example: UnZipRawMemory &resource, SizeOfResource(NULL,hRes), Data
Function Example: Size := UnZipRawMemory(&resource, SizeOfRes(NULL,hRes), Data)

Parameters

OutputVar

The name of the variable in which to store the size of unzipped memory in bytes.

Address

Address to raw zipped memory.

Size

Size in bytes of zipped memory.

VariableOrAddress (optional)

The name of a variable or address to copy unzipped memory to.

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 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

sz:=ResGet(data, A_AhkPath,"AHKEXEC.AHK","LIB")
UnZipRawMemory(&data, sz, var)
MsgBox % StrGet(&var, "UTF-8")