-
Notifications
You must be signed in to change notification settings - Fork 496
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
base: main
Are you sure you want to change the base?
Conversation
@bocops , @fulldecent (and anyone else) would appreciate comments before committing. |
There was a problem hiding this 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.
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. |
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.