Skip to content

Decompress a compressed tar once before reading it - #241

Merged
abrignoni merged 1 commit into
mainfrom
fix/tar-decompress-once
Sep 21, 2026
Merged

abrignoni merged 1 commit into
mainfrom
fix/tar-decompress-once

Conversation

@abrignoni

Copy link
Copy Markdown
Owner

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 now

The 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.py is the same file in all five cores.

🤖 Generated with Claude Code

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>
@abrignoni
abrignoni merged commit 2165f3c into main Sep 21, 2026
8 checks passed
@abrignoni
abrignoni deleted the fix/tar-decompress-once branch September 21, 2026 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant