mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-11 03:23:51 +00:00
feat(editor): add --catalog-stats for single-file deep size analysis
Reports header bytes (magic + version + nameLen + name + entryCount) vs entry-section bytes, average entry size, total file size, the catalog's name string length, and the first entry's id field. Useful for sizing analysis: "which catalogs are biggest, where do the bytes go, what's the per-entry overhead". Goes deeper than --info-magic which just reports the magic + version + name + count. The byte breakdown distinguishes: - headerBytes — fixed-cost header - catalogNameBytes — variable-length catalog label - entrySectionBytes — total size of all entries combined - averageEntryBytes — entrySectionBytes / entryCount Only the first entry's id is sampled because entries have variable-length name+description strings — multi-sampling produces garbage for most formats. The single sampled id is reliable because it sits at exactly headerBytes offset. JSON sidecar via --json. Format metadata (description / category) is included from the format table when the magic is recognized; unknown magics still get the size breakdown but no metadata. This is the 18th cross-format utility; the second per-file single-target one (alongside --info-magic). CLI flag count 1033 -> 1034.
This commit is contained in:
parent
6abd3f5398
commit
69857eea18
6 changed files with 199 additions and 0 deletions
|
|
@ -140,6 +140,7 @@ const char* const kArgRequired[] = {
|
|||
"--magic-fix", "--bulk-validate",
|
||||
"--bulk-export-json", "--bulk-import-json",
|
||||
"--diff-tree", "--orphan-jsons", "--list-by-magic",
|
||||
"--catalog-stats",
|
||||
"--gen-animations", "--gen-animations-combat", "--gen-animations-movement",
|
||||
"--info-wani", "--validate-wani",
|
||||
"--export-wani-json", "--import-wani-json",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue