Encode and decode Base45 strings (RFC 9285). Base45 is a compact alphanumeric encoding designed for QR codes — it uses only the 45-character subset QR codes can store in alphanumeric mode, giving ~30% smaller QR payloads than Base64. Famously used by EU Digital COVID Certificates.
Base45 encodes every 2 bytes as 3 characters (and a trailing odd byte as 2 characters) from the alphabet
0-9 A-Z space $%*+-./:. These 45 symbols are exactly the characters QR code alphanumeric
mode can represent at 5.5 bits each, so a Base45 payload fits ~30% more data per QR than Base64.
Reference: Encoding "AB" (0x41, 0x42) → "BB8". The string
"ietf!" encodes to "QED8WEX0".