Module dcbasenb

Module dcbasenb 

Source
Expand description

dcBasenb encoding/decoding: pack arbitrary Dcs into Unicode PUA.

Constants§

DC_BASENB_EMBEDDED_END
DC_BASENB_EMBEDDED_END_UUID_BYTES
End UUID bytes for embedded dcBasenb: 60bc936b-f10f-4f50-ab65-3778084060e2
DC_BASENB_EMBEDDED_START
DC_BASENB_EMBEDDED_START_BYTES
Start UUID bytes for embedded dcBasenb: e82eef60-19bc-4a00-a44a-763a3445c16f In StageL/JS, this was called getArmoredUtf8EmbeddedStartUuid. I think it’s specific to dcBasenb, though, not any basenb embedded within UTF-8.

Functions§

dca_from_dcbnb_fragment_utf8
Decode Dcs from a dcBasenb fragment (without enclosing UUIDs) from UTF-8.
dca_from_dcbnb_utf8
Decode Dcs from a dcBasenb run (with enclosing UUIDs) from UTF-8.
dca_to_dcbnb_fragment_utf8
Encode Dcs to a dcBasenb fragment (without enclosing UUIDs) UTF-8.
dca_to_dcbnb_utf8
Encode Dcs to a dcBasenb run (with enclosing UUIDs) in UTF-8.
dcbnb_get_first_char
Return the first “character” of a dcbnb UTF-8 byte slice, without doing any conversion. (?? The implementation actually appears to extract a whole dcbnb run up until the next non-dcbnb char. Maybe just a weird function name.)
dcbnb_get_last_char
Return the last “character” (run of base-nb digits from the right, including at most one distinct remainder char) of a dcbnb UTF-8 byte slice, in the same packed form.