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

No Streaming (Question / Brain storming) #16

Closed
nmccready opened this issue May 21, 2015 · 4 comments
Closed

No Streaming (Question / Brain storming) #16

nmccready opened this issue May 21, 2015 · 4 comments

Comments

@nmccready
Copy link

No Streaming Unzip API

Due to the design of the .zip file format, it's impossible to interpret a .zip file from start to finish (such as >from a readable stream) without sacrificing correctness. The Central Directory, which is the authority on >the contents of the .zip file, is at the end of a .zip file, not the beginning.

I really don't know jack about the zip format, but I am just trying to think out of the box here for possibly having a streaming api.

Since the CD is at the end can we not read the file stream in reverse? Thus then detect the CD.

The main use case I am looking is for getting a single large file out of many in a zip using streaming if possible.

@andrewrk
Copy link
Collaborator

It sounds like you are misunderstanding what "no streaming" means. When you extract a file from a zip file, you extract it as a stream, as expected. But the zip file itself must not be a stream; it must be a file on disk or in memory, or as in #14, some other sort of random access data.

@nmccready
Copy link
Author

No I get that part. I plan on getting the zip file via ftp as a stream. But I only need one file out of that zip of many.

@andrewrk
Copy link
Collaborator

If #14 is solved you could implement an interface to FTP which supports ranged reads, and then solve it that way.

@nmccready
Copy link
Author

Yes this is on point with what I was thinking as well. I guess I'll close this issue and follow the one above.

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