lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

> From: Marco Antonio Abreu
>> I need to create a compacted file (zip, gzip, bzip or tar.gz) with some
>> files inside it from a Lua script on Windows. I look for LuaZip, but it does
>> not create zip files, only read them.
>> What is the best solution for my need?

The above solutions (binding to an existing C library or os.execute a
command-line utility) are good ones.

For completeness, I'll mention that this would also be possible in
pure Lua, though with much more work.  The underlying DEFLATE
algorithm, used by zip/gzip has been implemented in [1], at least for
decompression.  The compression half could also be written if one is
so inclined.  bzip is not that much different.