Expand description
Minimal Document Character (DcChar) numeral encoding and Base64 encapsulation.
Provides the foundational encoding of unsigned 128-bit integers into sequences of short Document Characters (Dcs) using Format 199 and Base64 encapsulation Dcs (short Dcs 127..=190 and 195).
Functionsยง
- dc_
base64_ char_ to_ digit - Converts a Base64 encapsulation
DcCharinto its 6-bit numeral value (0..=63) or padding sentinel (64). - dc_
base64_ char_ to_ digit_ with_ resolver - Converts a Base64 encapsulation
DcCharinto its 6-bit numeral value (0..=63) or padding sentinel (64) usingresolver. - dc_
base64_ digit_ to_ char - Converts a 6-bit Base64 numeral value (0..=63) or padding sentinel (64) into
its corresponding Base64 encapsulation
DcChar. - integer_
to_ dc_ number_ chars - Encodes an arbitrary-precision
malachite::Integerinto canonicalDcNumberDcChartokens[Dc 6, <format_dc>, (optional Dc 11), <base64 digits>, Dc 7]. - is_
dc_ base64_ encapsulation_ char - Returns
trueifchis a Base64 encapsulation digit (127..=190) or padding (195). - is_
dc_ base64_ encapsulation_ char_ with_ resolver - Returns
trueifchis a Base64 encapsulation digit (127..=190) or padding (195) according toresolver. - read_
dc_ number_ u128 - Reads a single unsigned 128-bit integer from a slice of Document Character
Global Graph IDs (
&[u128]), returning the parsedu128integer and the number of tokens consumed from the slice. - read_
dc_ number_ u128_ with_ resolver - Reads a single unsigned 128-bit integer from a slice of Document Character
Global Graph IDs (
&[u128]) usingresolver, returning the parsedu128integer and the number of tokens consumed from the slice. - read_
typed_ dc_ integer - Convenience wrapper for
read_typed_dc_integer_with_resolverusing the default dataset syntax resolver. - read_
typed_ dc_ integer_ with_ resolver - Reads an arbitrary-precision signed integer from a
DcNumbertoken slice ([Dc 6, <format_dc>, (optional sign), <base64 digits>+, Dc 7]). - u128_
to_ dc_ number_ chars - Encodes an unsigned 128-bit integer into a sequence of
DcChars. - u128_
to_ dc_ number_ short - Encodes an unsigned 128-bit integer into a sequence of short Document Character IDs (
u32).