Function byte_array_to_basenb_utf8

Source
pub fn byte_array_to_basenb_utf8(base: u32, input: &[u8]) -> Result<Vec<u8>>
Expand description

Encode a raw byte array into Basenb (UTF-8 sequence of pack32 codepoints).

Steps:

  1. Convert bytes to bit array.
  2. Encode bit array via int_bit_array_to_basenb_string.
  3. Append remainder length marker: pack32(63497 - (bit_len % 17)). (Matches the original implementation’s workaround re: remainder storage.)

Returns the full UTF-8 (actually just raw bytes containing appended pack32 code units) representing the Basenb encoding.