-
Notifications
You must be signed in to change notification settings - Fork 241
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
Fix problems with ZipReader #52
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This constructor provides the ability to retain an associated file path even when providing an explicit IRandomAccess handle as well.
Sometimes the functionality provided by Location.getHandle is needed, but without enabling wrapping the handle in a zip/gzip/bzip2 decoder. For example, ZipReader uses it to get a raw input stream on a zip source, regardless of whether that zip is from disk or a remote URL.
The issue was that RandomAccessInputStream(String) will convert a zip file into a ZipHandle using Location.getHandle(String), but the ZipReader was assuming that RAIS would be feeding it raw data from the zip file itself. The fix forces the RAIS to create a raw handle rather than a ZipHandle.
This field already exists as protected in the superclass.
This simplifies the code in ZipHandle and avoids hardcoding URLHandle and NIOFileHandle as the only possibilities for handle resolution.
This refactors a common while loop to its own seekToEntry() method, and merges the entry location and counting code to a single loop to reduce the number of iterations through the zip stream.
melissalinkert
added a commit
that referenced
this pull request
Apr 15, 2012
Fix problems with ZipReader
hflynn
pushed a commit
to hflynn/bioformats
that referenced
this pull request
Oct 11, 2013
Fix section about labels in README.txt
melissalinkert
pushed a commit
to melissalinkert/bioformats
that referenced
this pull request
Jan 11, 2018
Fix used file list
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Back in October, some problems were reported on fiji-devel with the ZipReader. I fixed them shortly thereafter, but the changes fell through the cracks and were never fully tested or merged back to develop.
Fortunately, I recently rescued the topic branch, and just now rebased it over the latest develop. It worked fine, and still builds. All that remains is run the changes through the usual tests.
For further details, see:
https://groups.google.com/d/msg/fiji-devel/lZxNR00qYu8/3QcrmxY54h0J