Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create zip by concatenating pre-compressed files #70

Open
craigds opened this issue Jun 5, 2018 · 2 comments
Open

Create zip by concatenating pre-compressed files #70

craigds opened this issue Jun 5, 2018 · 2 comments

Comments

@craigds
Copy link

craigds commented Jun 5, 2018

Our websites offer generated downloads of user-filtered data. Data is generated by workers in parallel while the user is waiting, and the user clicks a link to download it once the workers have completed processing.

At present the workers can generate files in parallel, but the final task of creating a zip is non-parallelisable. We'd like to fix that so the users can start downloading data faster.

To stream zips to the user, we'd want:

  • workers generating DEFLATE-compressed files rather than non-compressed files. ie. all files produced would be run through gzip
  • mod_zip (or similar project I haven't found yet) would stream those files into a coherent zip, without re-compressing.
  • correct zip headers

My understanding is that mod_zip can't currently create zips from pre-compressed files. Is that correct? What is your feeling about how difficult it would be to implement?

I also gather from #23 that mod_zip generates non-compressed zip files, so it can produce correct filesize headers. Is that still correct? This change would obviously also fix that.

@martin-sucha
Copy link

@craigds Based on your description above, you might be interested in zipserve Go library that I made just this weekend. It supports deflated (or any other zip compression method, since the library does not handle the actual compression itself) file data.

@craigds
Copy link
Author

craigds commented Jul 30, 2018

That looks close to perfect, thanks for the link :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants