Skip to content

Add encoding algorithms to the specification #719

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Conversation

drinckes
Copy link
Contributor

@drinckes drinckes commented May 2, 2025

Fixes #718

This updates the specification to include both the reverse and forward encoding algorithms.

Most implementations currently use the reverse algorithm, but the forward one might be slightly more efficient since it only ever needs to compute the requested number of digits. (The existing reverse approach must calculate all 15 digits if 11 or more digits are requested, or at least 10 regardless of what is requested.)

There are some minor changes due to formatting the markdown with the Prettier VSCode extension.

@drinckes drinckes requested review from zongweil and rsramek May 2, 2025 11:30
@drinckes
Copy link
Contributor Author

drinckes commented May 2, 2025

@bocops , @fulldecent (and anyone else) would appreciate comments before committing.

Copy link
Contributor

@bocops bocops left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maximum values in encoding should reflect the multiplication with a large constant before.

@fulldecent
Copy link
Contributor

Great to see updates to the spec are in scope.

Please give me a little more time I'd like to get through all this.

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.

Update algorithm description in the specification
3 participants