Hello!
On Sat, Oct 17, 2015 at 5:47 AM, Aapo Talvensaari wrote:
> On Friday, 16 October 2015 16:17:13 UTC+3, bogdan wrote:
>> In our OpenResty web application we need to dinamically create a couple
>> of text files (based on user input) and then to create a Zip archive of
>> these files and to make this archive downloadable. The files should not
>> be written to disk, to minimize disk IO.
>> What would be the best way to achieve this?
>
>
> This looks to be doing what you want:
> https://github.com/brimworks/lua-zip
>
> Haven't tested it though. Requires libzip.
If the output can be large (I'd say 100KB+ is large), then you'd
better use the streaming processing and outputting approach if
feasible. The Zip format itself should be streaming friendly :)
Regards,
-agentzh