Skip to content

Pass the active input buffer to assertion callbacks - #356

Open
Aschenbath wants to merge 1 commit into
keichi:masterfrom
Aschenbath:fix/oss30-20261123-1909-binary-parser-assert-buffer
Open

Aschenbath wants to merge 1 commit into
keichi:masterfrom
Aschenbath:fix/oss30-20261123-1909-binary-parser-assert-buffer

Conversation

@Aschenbath

Copy link
Copy Markdown
Contributor

Assertion callbacks can now inspect the encoded bytes through a second argument, enabling checksums without a separate parsing pass. The existing parsed-value argument and callback context are unchanged. Document the supplied view and wrapped-parser buffer semantics with a checksum example.

Add coverage for checksums over a sliced input view, bitfields, and assertions inside array elements, for both Buffer and Uint8Array inputs. All six cases fail on the baseline and pass with the change.

Validation: 262 Node tests passed; Chromium 130 passed, 1 skipped; npm run format, npm run lint, and npm run build passed.

Fixes #88.

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.

Access buffer for assertions

1 participant