Closed ZJONSSON closed 2 months ago
@jpambrun can you check this out confirm whether this solution works
Yes, this branch works in my current project and minimal example in https://github.com/ZJONSSON/node-unzipper/issues/309.
This is not exaustive testing by any means.
published as + unzipper@0.11.5
This change severely breaks things - see #311
The stream method under the
Open
method did not utilize the fact that we know the size of the individual compressed file and, therefore, can avoid having the stream unbounded, reducing I/O.Each entry comprises the local file header followed by the compressed file content. The size of the local header is dynamic; the base variables are 30 bytes, but then we have a dynamically sized filename and extra field. For some reason, I have to add a small buffer on top (a few bytes) to get all test cases passing.
Local file header (source Wikipedia)
Thanks to @jpambrun for catching this. Closes https://github.com/ZJONSSON/node-unzipper/issues/308