#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

#1612 in Encoding

Download history 3/week @ 2024-06-02 8/week @ 2024-06-09 17/week @ 2024-06-16 29/week @ 2024-06-23 10/week @ 2024-06-30 6/week @ 2024-07-07 7/week @ 2024-07-14 6/week @ 2024-07-21 11/week @ 2024-07-28 42/week @ 2024-08-04 6/week @ 2024-08-11 6/week @ 2024-08-18 10/week @ 2024-08-25 22/week @ 2024-09-01 26/week @ 2024-09-08 18/week @ 2024-09-15

76 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