Skip to content

Conversation

@brucehappy
Copy link

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

…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
Copy link
Owner

@thejoshwolfe thejoshwolfe left a 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:
Copy link
Owner

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.

Copy link
Author

@brucehappy brucehappy Dec 19, 2018

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.
@brucehappy
Copy link
Author

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.

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

Successfully merging this pull request may close these issues.

2 participants