-
Notifications
You must be signed in to change notification settings - Fork 74
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
Base36 byte-encoding specification #65
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LGTM. Can we add a quick spec? We also need to specify that zero padding is done with zeros. |
Nod, will write one once I finish go-multibase tests in a bit |
Uses the alphabet 0-9a-z case insensitively. The prefix K is chosen to limit future clashes with english words based on https://en.wikipedia.org/wiki/Letter_frequency
ribasushi
force-pushed
the
feat/base36_spec
branch
from
May 22, 2020 00:47
a1e3125
to
07cd2ad
Compare
Stebalien
approved these changes
May 22, 2020
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.
Nits but otherwise lgtm
i will implement this in js multiformats/js-multibase#53 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As per our earlier decision we will start supporting base36 in all implementations, in order to resolve ipfs/kubo#7318
This adds the encoding/specification to the table of codecs. Another PR fixing up the test vectors and adding an actual program to generate them will follow.
The encoding uses the alphabet 0-9a-z case insensitively. The prefix
K
is chosento limit future clashes with english words based on https://en.wikipedia.org/wiki/Letter_frequency#Relative_frequencies_of_the_first_letters_of_a_word_in_the_English_language ( also the prefix
K2
evokes lofty goals 😛 )Typical encodings look like (generated by this program):
/cc @aschmahmann who I can't add to reviewers