Commit Graph

7 Commits

Author SHA1 Message Date
ab6b7ac8ed navmesh_decode: --limit carver counts match navmesh_index
A stream that starts inside a --limit window but ends past it was counted in carver_streams with
all its stored bytes, so stored + zero_padding + unread could exceed the span (up to 122% on a
2 MiB window of navmeshes.rpf). navmesh_index.py (#766) does not count such a stream; its bytes
inside the window are left to the tail. navmesh_decode now does the same and reports those
streams under past_window / past_window_stored instead of dropping them. Decoding is unchanged: a
resource that starts inside the window is still read to its end.

Real data (counts only), four 2 MiB windows of navmeshes.rpf: byte classes now add up to exactly
the span (main: 121.97%, 119.01%, 100.23%, 103.64%), and streams, stored, inflated, zero_padding
and unread equal navmesh_index.py's on every window.

Tests: the window-limit test now expects 1 carved stream + 1 past_window (main: 2); a new test
ends the window inside a stream and checks nothing is carved and the classes sum to the span.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 08:29:13 -03:00
a3f0d910f1 navmesh_decode: refuse a report path that is the input
`--out <the archive>` (and `--csv <the archive>`) opened the input for
writing after the scan and replaced it with the JSON summary, exit 0, no
warning. Refuse the combination up front, as the --out/--csv collision
already is, so the archive is never touched.
2026-11-22 03:37:40 -06:00
fe953bf831 navmesh_decode: create the --out and --csv folders instead of losing the run
The scan finished, then a report path in a folder that did not exist ended
the run in a FileNotFoundError traceback and threw away the summary. Create
the parent folder at write time, as navmesh_index.py already does.
2026-11-22 03:22:14 -06:00
9f3ec1ab46 navmesh_decode: reject colliding JSON and CSV reports 2026-11-22 05:04:30 -03:00
36e63f11dc navmesh_decode.py: a header-only PSIN doesn't take the next stream (review)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 06:41:11 +01:00
6c8337c4f9 navmesh_decode.py: a PSIN header with no section is incomplete
_psin_state() walked the section list and reported a resource complete when
the walk ended exactly at the end of the data. A PSIN header with no section
at all ends there too, so it was counted complete with 0 sections. At least
one section is now required.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 06:29:25 +01:00
2a41e7a44c Navmesh: decode 0DRP cover-point pages, 0x00010015 tiles and Band-3 grids (ASSET-22) 2026-11-21 22:03:23 -03:00