The "xzip_read" Function
#
SyntaxArgument | Type | Description |
---|---|---|
arch | string | The full path and filename of the archive to read from |
file | string/integer | The name or index of a file to read |
#
DescriptionReads a file from an archive directly into memory (instead of extracting to the disk) and returns the result as a buffer. This is especially useful for game data like audio and surfaces which have built-in buffer functions in GameMaker Studio.
If the input archive or file within do not exist, -1
will be returned instead, so it's a good idea to run buffer_exists
before handling data returned by this script.
#
ExampleThis will load a surface from an archive and copy it to a pre-existing surface for drawing.