Allows the creation of ZIP files. This class implements a writer that allows storing the multiple blobs in a ZIP archive. See also [ZIPReader] and [PCKPacker]. [codeblock] # Create a ZIP archive with a single file at its root. func write_zip_file(): var writer = ZIPPacker.new() var err = writer.open("user://archive.zip") if err != OK: return err writer.start_file("hello.txt") writer.write_file("Hello World".to_utf8_buffer()) writer.close_file() writer.close() return OK [/codeblock] Closes the underlying resources used by this instance. Stops writing to a file within the archive. It will fail if there is no open file. Opens a zip file for writing at the given path using the specified write mode. This must be called before everything else. Starts writing to a file within the archive. Only one file can be written at the same time. Must be called after [method open]. Write the given [param data] to the file. Needs to be called after [method start_file]. The compression level used when [method start_file] is called. Use [enum ZIPPacker.CompressionLevel] as a reference. Create a new zip archive at the given path. Append a new zip archive to the end of the already existing file at the given path. Add new files to the existing zip archive at the given path. Start a file with the default Deflate compression level ([code]6[/code]). This is a good compromise between speed and file size. Start a file with no compression. This is also known as the "Store" compression mode and is the fastest method of packing files inside a ZIP archive. Consider using this mode for files that are already compressed (such as JPEG, PNG, MP3, or Ogg Vorbis files). Start a file with the fastest Deflate compression level ([code]1[/code]). This is fast to compress, but results in larger file sizes than [constant COMPRESSION_DEFAULT]. Decompression speed is generally unaffected by the chosen compression level. Start a file with the best Deflate compression level ([code]9[/code]). This is slow to compress, but results in smaller file sizes than [constant COMPRESSION_DEFAULT]. Decompression speed is generally unaffected by the chosen compression level.