#base58 #32-byte #codec #numbers #optimized #64 #bs58

fd_bs58

Optimized Base58 codec for 32 and 64 byte numbers

1 unstable release

0.1.0 Nov 14, 2023

#1637 in Encoding

Download history 10/week @ 2024-08-10 6/week @ 2024-08-17 8/week @ 2024-08-24 24/week @ 2024-08-31 24/week @ 2024-09-07 18/week @ 2024-09-14 29/week @ 2024-09-21 55/week @ 2024-09-28 19/week @ 2024-10-05 15/week @ 2024-10-12 17/week @ 2024-10-19 24/week @ 2024-10-26 37/week @ 2024-11-02 41/week @ 2024-11-09 66/week @ 2024-11-16 33/week @ 2024-11-23

183 downloads per month
Used in 3 crates

Apache-2.0

47KB
1K SLoC

An optimized implementation of Base58 encoding/decoding for 32 and 64 byte numbers. This library is based off of the original C implementation from Jump Crypto's Firedancer repo which can be found here. These algorithms are significantly faster than the commonly used bs58 library for 32 and 64 bytes.

Development

To run the fuzzer: cargo-fuzz run decode_32

To run a benchmark: cargo bench encode_32


lib.rs:

An optimized implementation of Base58 encoding/decoding for 32 and 64 byte numbers. This library is based off of the original C implementation from Jump Crypto's Firedancer repo which can be found here. These algorithms are significantly faster than the commonly used bs58 library for 32 and 64 bytes.

Performance vs. bs58

Algorithm Speedup
encode_32 ~9x
encode_64 ~13x
decode_32 ~3x
decode_64 ~5x

No runtime deps