yabase/base64/dq

Values

pub fn decode(
  input: String,
) -> Result(BitArray, encoding.CodecError)

Decode a Base64 DQ (hiragana) string to a BitArray.

Non-alphabet graphemes (whitespace, ASCII, mismatched kana, etc.) are rejected with InvalidCharacter carrying the offending grapheme and its position. The alphabet check runs before the length check so the caller does not see a misleading InvalidLength when the real fault is an out-of-alphabet grapheme.

pub fn encode(data: BitArray) -> String

Encode a BitArray to Base64 DQ (hiragana).

Search Document