-
Notifications
You must be signed in to change notification settings - Fork 36
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
feat: Allow the archive offset behavior of the reader to be configured. #109
Conversation
Reading the PR guidelines, I realize that I need to sign my commit. I'll add my keys and do that (though it may be in 2 weeks because I'm going to be away). |
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.
Mostly looks good, but has some room for improvement.
Be aware that #93 may cause conflicts with this PR if it's merged first. |
@afranchuk When should we expect another revision of this PR? An ETA will be helpful for planning around the other major PRs that are currently open. |
@Pr0methean I'm working on cleaning it up now (just returned yesterday). |
Aside from supporting the current behavior which allows archives to be preceded by arbitrary data (added in fc749a09), this also allows detection of the offset to use by checking whether a central directory header is at the expected location. This is configurable because if the behavior were based only on detection, there could be false positives if archive data happened to contain a central directory header at the right spot.
9e1426c
to
a8875b0
Compare
Aside from supporting the current behavior which allows archives to be preceded by arbitrary data (added in fc749a09), this also allows detection of the offset to use by checking whether a central directory header is at the expected location. This is configurable because if the behavior were based only on detection, there could be false positives if archive data happened to contain a central directory header at the right spot.
The motivation for this was to support slightly non-standard central directory locations (such as described here).