You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sorry for creating an issue out of this, you can close it right after. I just wanted clarification regarding the usage of streams in this library.
Yauzl has a point regarding streams that said:
Follow the spec. Don't scan for local file headers. Read the central directory for file metadata. (see No Streaming Unzip API).
I noticed that this library uses Streams. Is this an implementation detail that differs from the original Yauzl, or are streams being used in a different way that doesn't break the spec? Apologies for the potentially stupid question, appreciate it!
The text was updated successfully, but these errors were encountered:
This library does not accept the input ZIP file as a stream. It requires random access, for the reasons you've quoted.
It starts at the end of the ZIP file and works backwards to find the Central Directory.
But once the Central Directory is found, that directory identifies the start and end positions of each file in the ZIP. At that point, yauzl-promise switches to streams in order to read each individual file from the ZIP and stream it out to the user.
This is exactly how yauzl works too, and in no way violates the ZIP spec.
I hope that makes sense. If it does, please close the issue. But if it doesn't, feel free to ask more questions!
Sorry for creating an issue out of this, you can close it right after. I just wanted clarification regarding the usage of streams in this library.
Yauzl has a point regarding streams that said:
Follow the spec. Don't scan for local file headers. Read the central directory for file metadata. (see No Streaming Unzip API).
I noticed that this library uses Streams. Is this an implementation detail that differs from the original Yauzl, or are streams being used in a different way that doesn't break the spec? Apologies for the potentially stupid question, appreciate it!
The text was updated successfully, but these errors were encountered: