Documentation ¶
Overview ¶
Package lex64 is a base64 variant that preserves lexicographic ordering of bytestrings. It does this by using the alphanumeric characters, _, . and - as the alphabet.
- is used as padding since it is the smallest character.
The codec preserves order and has roundtrip equality.
This package has two versions of the alphabet. V2 is the default and is URL-safe. V1 is legacy and is not URL-safe.
Lex64 V2 is a base64 encoding using the following alphabet:
.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz
The padding character is '-', which precedes the characters above. Lex64, by default, omits the padding character from generated strings, but can be made to emit them and conform to rfc4648 (with a different alphabet).
Lex64 also supports the following legacy alphabet:
0123456789=ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz
At time of writing (2023 Q1), the legacy alphabet is used in Karte.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.