ZipAddBuffer

Add a file from memory to a zip archive created with ZipCreateBuffer or ZipCreateFile.

OutputVar := ZipAddBuffer(ZipHandle, Address or BufferObject , Size, FileName)
Command  Example: ZipAddBuffer hZip, var, StrPut(var), "MyScript.ahk"
Function Example: Success := ZipAddBuffer(hZip, varBuffer,, "MyScript.ahk")

Parameters

OutputVar

The name of the variable in which to store 1 / true if file was added successfully or 0 / false if operation failed.

ZipHandle

Zip handle returned from ZipCreateFile or ZipCreateBuffer.

Address or BufferObject

Address of data or Buffer object to be added to zip archive.

Size (optional)

Size in bytes of data in memory. Not required for Buffer object.

FileName (optional)

Name of the file that will be added in zip archive.

Related

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

Examples

hZip:=ZipCreateBuffer(10000000)
ZipAddBuffer(hZip, StrPtr(script), StrPut(script), "MyScript.ahk")
zipBuffer := ZipCloseBuffer(hZip)