Thank you, Aapo, for the answer
Indeed, there is no difference from the previous question, but the answers there weren't enough.
First of all, we would need stream processing, but I didn't find a module that does that and to be fully tested with OpenResty. That's why I asked, hoping that somebody actually had to do this.
The os.execute/lua-resty-shell option is another approach we thought of, but we would prefer to have the least coupling with the os. Our solution should work on other architectures (arm) and there the zip utilities might be different.
Anyway, I will take a look at https://github.com/evanmiller/mod_zip, this is the way I thought would be the best. But we will need to recompile OpenResty and I was hoping there is something written as a Lua module that doesn't need this :)
I was hoping there is a pure-lua implementation of the
zip algorithm, which is non-blocking and has no external ("lib") dependencies :) I guess there isn't anything like this, though.
Thank you for the help
Bogdan
Aapo Talvensaari wrote:
On Sunday, 15 May 2016 23:48:24 UTC+3, Aapo Talvensaari wrote:
On Thursday, 12 May 2016 17:59:34 UTC+3, bogdan wrote:
No answer to this?
Bummer
How does this question differ from this:
https://groups.google.com/forum/#!searchin/openresty-en/zip/openresty-en/-bTMc91WNkQ/laDckzgVDgAJ
<https://groups.google.com/forum/#!searchin/openresty-en/zip/openresty-en/-bTMc91WNkQ/laDckzgVDgAJ>
Did you try any of the suggestions there?
Here is a list that you may look at:
1. http://lua-users.org/wi
ki/CompressionAndArchiving
2. https://github.com/evanmiller/mod_zip
But then again, why make things hard, if you can just use:
1. os.execute
2. https://github.com/juce/lua-resty-shell
You could run the above to pre-build archives on:
1. ngx.timer_at (say once a day)
2. cron (say once a day)
3. on first request and then cache
Regards
Aapo.