qr-base45

Crates.ioqr-base45
lib.rsqr-base45
version0.1.1
created_at2025-10-31 16:39:32.076406+00
updated_at2025-10-31 16:39:32.076406+00
descriptionBase45 encode/decode for arbitrary bytes per RFC 9285 (QR alphanumeric alphabet)
homepage
repositoryhttps://github.com/kookyleo/qr-base45
max_upload_size
id1910299
size20,674
(kookyleo)

documentation

README

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

cargo add qr-base45
use qr_base45::{encode, decode};

let data: &[u8] = &[0x01, 0x02, 0xFF];
let s = encode(data);
let back = decode(&s).unwrap();
assert_eq!(back, data);

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

Commit count: 0

cargo fmt