A bunch of enhancements for dealing with large tar archives #37
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.
This pull request contains following changes to the
Tar
class:static public
methods to make them testable without a need to create >8GiB files.pack()
calls (only the very last 512 bytes block needs it).Tar::readCurrentEntry()
method which allows reading tar entry content while iterating trough the archive with the generator returned by theTar::yieldContents()
. This allows efficient inspection of large tar archive content without need to extract it. In my particular case it is allows me to check backup consistency with code like$chunkSize
only) and reads the archive only once no matter the tar archive size and format (compressed or not).