Use native sequential archive input for TAR and CPIO - #380
Merged
Merged
Conversation
This file contains hidden or 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
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.
What changed
IArchiveFormatOperations, so concrete descriptor public API/documentation does not grow just to specialize a default interface member.OpenEntryStreamingcan return the first entry without consuming the remainder of the archive.Why these formats
POSIX ustar/pax is intrinsically sequential: a 512-byte header is followed by that entry's data blocks, with two zero blocks terminating the archive. CPIO is likewise a sequence of header, pathname, payload records ending at
TRAILER!!!. Their existing readers already support non-seekable sources, so the generic temporary-file compatibility spool added by #373 is unnecessary overhead for these formats.AR was reviewed but deliberately not changed: the current reader materializes ordinary members and depends on seeking for oversized members, so a native streaming override would not yet be uniformly safe.
Reference material
TRAILER!!!.No external source code was copied or translated. No new dependencies were introduced.
Validation
mainat7bf197676b1a33039caaddb9f79da27ffdb7328c.