The carver accepted a raw DEFLATE stream when the inflated bytes started with
DXBC and had the expected size, even if the stream never reached its final
block. It now also requires decompressor.eof, so a stream cut off or
corrupted after the payload is counted as rejected.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
It read sys.argv by hand, so no arguments stopped with IndexError. A missing archive
(or a folder in its place) created the output folder first and then ended in a
traceback, and an empty archive failed in mmap. It now checks the archive before
anything is created: a usage error (exit 2) with no output folder left behind.
The documented `shader_carve.py <archive.rpf> <out_dir>` form is unchanged.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>