qr-base45
Base45 encode/decode for arbitrary bytes per RFC 9285 (QR alphanumeric alphabet).
- 2 bytes -> 3 chars; 1 byte -> 2 chars
- Alphabet:
0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./: - Public API: byte-oriented, no string reinterpretation
Usage
use ;
let data: & = &;
let s = encode;
let back = decode.unwrap;
assert_eq!;
Notes
- This crate intentionally encodes/decodes arbitrary bytes, not UTF-8 text. If you have a text string, pass its bytes explicitly.
- Errors include invalid characters, dangling final character, and value overflow per RFC rules.
License
Apache-2.0