Base36 byte-encoding specification #65
Merged
+78
−20
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