qr-base45 0.1.1

Base45 encode/decode for arbitrary bytes per RFC 9285 (QR alphanumeric alphabet)
Documentation
  • Coverage
  • 50%
    4 out of 8 items documented0 out of 3 items with examples
  • Size
  • Source code size: 20.7 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 84.4 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 8s Average build duration of successful builds.
  • all releases: 8s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • kookyleo/qr-base45
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • kookyleo

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