Skip to content

Header only read - #46

Merged
foxtacles merged 2 commits into
masterfrom
header-only-read
Mar 15, 2026
Merged

foxtacles merged 2 commits into
masterfrom
header-only-read

Conversation

@foxtacles

Copy link
Copy Markdown
Member

HeaderOnly mode reads just the RIFF header, MxHd, and MxOf offset table, then stops - enabling callers to defer per-object reads using ReadObject. This is useful if you are not interested in reading through the whole file but want targeted extraction of known objects.

Extract MxCh data-assignment logic from ReadChunk into a shared
ProcessDataChunk helper, and add ReadObjectData which seeks to a
single object's MxSt block and reads only its data chunks. This
enables loading animation/audio data by object ID without reading
the entire interleaved file.
Replace ReadObjectData with a simpler ReadObject(FileBase*, slot) that
seeks to the MxSt at the given slot index and reuses ReadChunk to parse
the full object tree and data chunks.

HeaderOnly mode reads just the RIFF header, MxHd, and MxOf offset table,
then stops - enabling callers to defer per-object reads.
@foxtacles
foxtacles merged commit 17c7736 into master Mar 15, 2026
2 checks passed
@foxtacles
foxtacles deleted the header-only-read branch March 15, 2026 21:32
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