Skip to content

feat(res): support 16-bit entry offsets#2269

Merged
skylot merged 1 commit intoskylot:masterfrom
pubiqq:support-offset16
Sep 6, 2024
Merged

feat(res): support 16-bit entry offsets#2269
skylot merged 1 commit intoskylot:masterfrom
pubiqq:support-offset16

Conversation

@pubiqq
Copy link
Copy Markdown
Contributor

@pubiqq pubiqq commented Sep 6, 2024

Fixes #2267

@skylot
Copy link
Copy Markdown
Owner

skylot commented Sep 6, 2024

Hm, with sample provided in #2267 (comment) parsing fail at closest

is.checkPos(entriesStart, "Expected first entry start");

because of additional 2 bytes, maybe it is padding, so it might be better to change this line to

is.skipToPos(entriesStart, "Failed to skip to entries start");

And, as soon as, sample also use compact entries, it still can't be parsed, so I am not sure if this is a correct solution.
To be honest, it is better to merge this PR with compact entries support, because this is the only way to verify its correctness.

@pubiqq
Copy link
Copy Markdown
Contributor Author

pubiqq commented Sep 6, 2024

This PR only adds support for 16-bit entry offsets. Not support for compact entries, not support for non-standard paddings, only 16-bit entry offsets.

But if you insist on implementing all together, then you can close the PR. I don't think I'll create a PR with compact entries support, because my current implementation of the resource parser is too different from yours.

@skylot
Copy link
Copy Markdown
Owner

skylot commented Sep 6, 2024

I see.
I will try to implement compact entries support myself and will merge this PR once I managed to parse provided sample.

@skylot skylot self-assigned this Sep 6, 2024
@skylot skylot merged commit 937dd20 into skylot:master Sep 6, 2024
@pubiqq pubiqq deleted the support-offset16 branch October 10, 2024 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[core] 16-bit resource entry offsets are not supported

2 participants