8 stable releases

3.2.0 Dec 16, 2025
3.1.0 Jun 30, 2023
3.0.0 Jun 3, 2021
2.0.1 Apr 2, 2021
1.0.2 Mar 22, 2021

#884 in Encoding

Download history 500/week @ 2025-12-09 665/week @ 2025-12-16 243/week @ 2025-12-23 380/week @ 2025-12-30 553/week @ 2026-01-06 766/week @ 2026-01-13 746/week @ 2026-01-20 1306/week @ 2026-01-27 694/week @ 2026-02-03 1713/week @ 2026-02-10 912/week @ 2026-02-17 1409/week @ 2026-02-24 2106/week @ 2026-03-03 2253/week @ 2026-03-10 2192/week @ 2026-03-17 1452/week @ 2026-03-24

8,408 downloads per month
Used in 7 crates (6 directly)

MIT license

14KB
268 lines

Base45

Test and publish Base45 Crate API

A encoder/decoder for base45 that is fully compatible with rfc9285. When encoding QR or Aztec codes, a scheme other than the standard base64, base32, and base16 is needed.

Installation

[dependencies]
base45 = "1.0.1"

Benchmarks

Benchmarks were created using Criterion. The benchmarks test encoding and decoding of the string "The quick brown fox jumps over the lazy dog". Test computer is a MacBook Pro 14" (2021) M1 Pro with 32 GB RAM.

encode long string              time:   [107.51 ns 107.69 ns 107.91 ns]
encode long string from buffer  time:   [126.66 ns 126.84 ns 127.07 ns]
decode long string              time:   [115.58 ns 115.81 ns 116.08 ns]

encode long str 100 times       time:   [12.805 µs 12.821 µs 12.839 µs]
decode long str 100 times       time:   [12.407 µs 12.424 µs 12.445 µs]

encode 0x10 random bytes        time:   [57.717 ns 57.827 ns 57.946 ns]
encode 0x100 random bytes       time:   [292.00 ns 292.64 ns 293.50 ns]
encode 0x1000 random bytes      time:   [3.6926 µs 3.6962 µs 3.7001 µs]
encode 0x10000 random bytes     time:   [65.210 µs 65.476 µs 65.755 µs]

No runtime deps