Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

const-oid: fix (and simplify) base 128 encoder #1600

Merged
merged 1 commit into from
Nov 2, 2024

Conversation

tarcieri
Copy link
Member

@tarcieri tarcieri commented Nov 2, 2024

This changes the base 128 decoder to calculate the length of a base 128-encoded arc and then iterates over each byte, computing the value for that byte, without any mutable state other than the position.

It also refactors the unit tests and adds an example extracted from proptest failures. The new implementation passes that test.

Closes #1585

This changes the base 128 decoder to calculate the length of a base
128-encoded arc and then iterates over each byte, computing the value
for that byte, without any mutable state other than the position.

It also refactors the unit tests and adds an example extracted from
proptest failures. The new implementation passes that test.
@tarcieri tarcieri force-pushed the const-oid/fix-base128-encoder branch from 94144bf to 11a2bbd Compare November 2, 2024 23:13
@tarcieri tarcieri merged commit cc1ffe8 into master Nov 2, 2024
113 checks passed
@tarcieri tarcieri deleted the const-oid/fix-base128-encoder branch November 2, 2024 23:28
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.

const-oid: panic unexpected, parser bugs
1 participant