-
Notifications
You must be signed in to change notification settings - Fork 80
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
Async RandomAccessReader and zips within zips #100
base: master
Are you sure you want to change the base?
Async RandomAccessReader and zips within zips #100
Conversation
…pport create a reader implementation for stored entries within a zip file, thereby supporting stored zips within zips. Add a test for the new classes based on the existing range-test. Related to thejoshwolfe#89
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the PR! unfortunately, I'm extremely picky when it comes to this codebase, and I am inclined to implement this in a different way. I'm not going to have time to do it tonight, but I will try to get to it before the holidays and the new year.
|
||
exports.runTest = runTest; | ||
|
||
// zipfile obtained via: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for being conscientious enough to add tests 👍 . However, I think we can test this functionality in a much simpler way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair enough. I wanted to be certain that ranges within what is basically another range (the zip in the zip) worked properly.
… non-async createReadStream/readStreamCallback calls, but not after running an async createReadStream call. Instead, wait for that call's callback has executed readStreamCallback before unref'ing.
My main goal was backwards compatibility with existing code and RandomAccessReader implementations while adding support for accessing a stored zip within a zip without having to read the whole thing into a buffer or temp file. Looking forward to seeing your approach to solving the problem. |
Add support for an asynchronous RandomAccessReader, and using that support create a reader implementation for stored entries within a zip file, thereby supporting stored zips within zips. Add a test for the new classes based on the existing range-test.
Related to #89