Crate qr_base44

Crate qr_base44 

Source
Expand description

qr-base44: Base44 encoder/decoder for arbitrary bytes using URL-safe QR-compatible alphabet.

  • Encoding groups: 2 bytes -> 3 chars; 1 byte -> 2 chars.
  • Alphabet: “0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ$%*+-./:” (44 chars, excludes space only)
  • Public API encodes &u8 -> String and decodes &str -> Vec.

Enums§

Base44Error

Constants§

BASE44_ALPHABET
Base44 alphabet: URL-safe QR-compatible subset (excludes space only)

Functions§

decode
Decode a Base44 string back to raw bytes. Accepts only the Base44 alphabet; returns errors for invalid chars, dangling final char, or overflow.
decode_bits
Decode a Base44 string back to bytes, expecting a specific bit count.
encode
Encode arbitrary bytes into a Base44 string. Groups of 2 bytes produce 3 characters; a final single byte produces 2 characters.
encode_bits
Encode a fixed number of bits (arbitrary length) as a Base44 string with optimal length.