Table of contents: resource entries and the tail span #232

Manually merged
github merged 1 commit from gh-pr/232/head into gh-pr/232/base 2026-11-26 20:20:05 +00:00
Owner

@⁠holdmysocks on GitHub · 2026-11-25 00:52 UTC · original
holdmysocks:claude/rpf9-toc-resources → master · +143 −36 · 2 files · 1 commits · merged 2026-11-25 02:40 UTC

Follow-up to #224, which merged before this part was ready.

What this adds

  • The table reader now reads the 20-byte resource entry column that most inner archives use (offset, stored size, size of the unpacked first part, resource type). sixng toc lists those entries next to file entries.
  • The span rule applies the fourth number of a file's span record: a tail length at the end of the data. A resource's data starts after a 16-byte prefix, and its spans are measured from there.
  • sixng toc-extract therefore also writes the 746 script resources (<offset>.rsc), each checked like the other files.

Checked

  • Whole install: 1,398 files written (the 652 from #224 and 746 script resources), 0 failures, about 6 s with a warm file cache; all identical to an independent reference extraction.
  • cargo test --release --locked -p sixng-core passes on Windows; the span rule and resource unpacking have unit tests.
  • The resource entry column has no test on a synthetic table; it is covered by the install run above.

Not done

  • The content of the script resources is not decoded.
  • A resource's second part (after the first unpacked part) is not read; such a resource is reported as an error by toc-extract. None of the 746 has one.
**@⁠holdmysocks** on GitHub · 2026-11-25 00:52 UTC · [original](https://github.com/holdmysocks/SixNG/pull/232) `holdmysocks:claude/rpf9-toc-resources` → `master` · +143 −36 · 2 files · 1 commits · merged 2026-11-25 02:40 UTC Follow-up to #224, which merged before this part was ready. ## What this adds - The table reader now reads the 20-byte resource entry column that most inner archives use (offset, stored size, size of the unpacked first part, resource type). `sixng toc` lists those entries next to file entries. - The span rule applies the fourth number of a file's span record: a tail length at the end of the data. A resource's data starts after a 16-byte prefix, and its spans are measured from there. - `sixng toc-extract` therefore also writes the 746 script resources (`<offset>.rsc`), each checked like the other files. ## Checked - Whole install: 1,398 files written (the 652 from #224 and 746 script resources), 0 failures, about 6 s with a warm file cache; all identical to an independent reference extraction. - `cargo test --release --locked -p sixng-core` passes on Windows; the span rule and resource unpacking have unit tests. - The resource entry column has no test on a synthetic table; it is covered by the install run above. ## Not done - The content of the script resources is not decoded. - A resource's second part (after the first unpacked part) is not read; such a resource is reported as an error by `toc-extract`. None of the 746 has one.
Reads the 20-byte resource entry column that most inner archives use, and applies the fourth number of a file's span record (a tail length). toc-extract now also writes the 746 script resources; each is checked like the other files.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 20:20:02 +00:00
github manually merged commit 24f3a5e67e into gh-pr/232/base 2026-11-26 20:20:05 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.