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

Zipping files from streams #1

Open
Lazarus404 opened this issue May 8, 2016 · 2 comments
Open

Zipping files from streams #1

Lazarus404 opened this issue May 8, 2016 · 2 comments
Labels

Comments

@Lazarus404
Copy link

I've noticed this library also contains a zip function, but no examples of how to use it. I need to download a bunch of files from AWS S3, zip them as they download, then feed the zip to the requesting user via Phoenix response. Is this possible with this library?

Thanks

@awetzel
Copy link
Collaborator

awetzel commented May 8, 2016

Unfortunatly, the ZIP Spec defines a way to allow streaming when writing the file with a "data descriptor" at the end of each file defining size and checksum AFTER the file. But nearly none implementation understand this data descriptor.
So no this lib will not create a zip as stream since it is not actually possible :)

But I plan to add support to write zip to a file with an Elixir binary "stream" input.

@Lazarus404
Copy link
Author

Hi Arnaud,

This is what I'm attempting to do in Elixir:
http://engineroom.teamwork.com/how-to-securely-provide-a-zip-download-of-a-s3-file-bundle/

I don't know if that library helps? I'm essentially hoping to reduce
memory and drive requirement on the server

Regards,
Lee

On Mon, May 9, 2016 at 6:15 AM, Arnaud Wetzel [email protected]
wrote:

Unfortunatly, the ZIP Spec defines a way to allow streaming when writing
the file with a "data descriptor" at the end of each file defining size and
checksum AFTER the file. But nearly none implementation understand this
data descriptor.
So no this lib will not write zip file as stream since it is not actually
possible :)

But I plan to add support to write zip to a file with an Elixir binary
"stream" input.


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#1 (comment)

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

No branches or pull requests

3 participants