#ascii #binary #data #convert #supported

basen

Convert binary data to ASCII with a variety of supported bases

1 unstable release

0.1.0 Aug 2, 2022
Download history 6/week @ 2022-11-16 4/week @ 2022-11-23 3/week @ 2022-11-30 10/week @ 2022-12-07 39/week @ 2022-12-14 23/week @ 2022-12-21 5/week @ 2022-12-28 20/week @ 2023-01-04 122/week @ 2023-01-11 383/week @ 2023-01-18 386/week @ 2023-01-25 266/week @ 2023-02-01 239/week @ 2023-02-08 254/week @ 2023-02-15 139/week @ 2023-02-22 201/week @ 2023-03-01

910 downloads per month
Used in snug

MIT/Apache

11KB
208 lines

BaseN

Convert binary data to ASCII with a variety of supported bases.

assert_eq!(BASE58.encode_const_len(&1557596383284252235u64), "4chjCmhbVFY");
assert_eq!(BASE58.decode_const_len("4chjCmhbVFY"), Some(1557596383284252235u64));

Characters required (without padding):

bits 32 64 128 256 512
Base10 10 20 39 78 155
Base16 8 16 32 64 128
Base32 7 13 26 52 103
Base36 7 13 25 50 100
Base58 6 11 22 44 88
Base62 6 11 22 43 86
Base64 6 11 22 43 86

No runtime deps