Module ffi.zipwriter

Zip packing workflow & code from luarocks' zip.lua : https://github.com/luarocks/luarocks/blob/master/src/luarocks/tools/zip.lua Modified to not require lua-zlib (we can wrap zlib with ffi) cf: http://luajit.org/extffitutorial.html, which uses zlib as an example ! Simplified to take filename and content from strings and not from disk

Functions

ZipWriter:_open_new_file_in_zip (filename) Begin a new file to be stored inside the zipfile.
ZipWriter:_write_file_in_zip (data, no_compression) Write data to the file currently being stored in the zipfile.
ZipWriter:_close_file_in_zip () Complete the writing of a file stored in the zipfile.
ZipWriter:close () Complete the writing of the zipfile.


Functions

ZipWriter:_open_new_file_in_zip (filename)
Begin a new file to be stored inside the zipfile.

Parameters:

  • filename
ZipWriter:_write_file_in_zip (data, no_compression)
Write data to the file currently being stored in the zipfile.

Parameters:

  • data
  • no_compression
ZipWriter:_close_file_in_zip ()
Complete the writing of a file stored in the zipfile.
ZipWriter:close ()
Complete the writing of the zipfile.
generated by LDoc 1.5.0 Last updated 2024-03-18 16:45:36