Decompress a compressed tar once before reading it - #241
Merged
Merged
Conversation
A compressed stream seeks backwards by decompressing again from its start. The tar seeker reads each search's matches in archive order, but artifacts search one after another, so a compressed tar read in place rewinds over and over. On a 5.36 GB Android extraction with ALEAPP that was 56 rewinds and 220 GB decompressed as a .tar.gz, 347 s against 33 s for the plain tar, and about two hours projected as a .tar.xz. FileSeekerTar now decompresses a gzip, bzip2, xz or (on Python 3.14) zstd tar once into the report folder and reads the plain copy. cleanup() deletes the copy, and so does exit if a run never reaches cleanup(). When the copy cannot be written the seeker logs why and reads the archive in place as before. The run log records how long the step took, and the README says the run needs free space for the uncompressed tar. test_seeker_tar_compressed.py covers every codec this Python can write, a plain tar, a copy that cannot be written and a truncated archive. It is the same file in all five cores. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
A compressed tar is now decompressed once into the report folder and read as a plain tar. Read in place, it decompressed again from the start every time the seeker went back to an earlier file.
On a 5.36 GB Android extraction with ALEAPP, all 59 LAVA tables identical to the plain tar:
.tar: 31 s.tar.gz: 347 s before (56 rewinds, 220 GB decompressed), 40 s now.tar.xz: about two hours projected before, 221 s nowThe copy is deleted when the run ends, or at exit if the run never gets there. If it cannot be written, the seeker logs why and reads the archive in place as before. The README says the run needs free space for the uncompressed tar.
test_seeker_tar_compressed.pyis the same file in all five cores.🤖 Generated with Claude Code