#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

#1587 in Encoding

Download history 10/week @ 2024-07-22 7/week @ 2024-07-29 44/week @ 2024-08-05 5/week @ 2024-08-12 7/week @ 2024-08-19 9/week @ 2024-08-26 23/week @ 2024-09-02 26/week @ 2024-09-09 17/week @ 2024-09-16 37/week @ 2024-09-23 58/week @ 2024-09-30 7/week @ 2024-10-07 14/week @ 2024-10-14 21/week @ 2024-10-21 29/week @ 2024-10-28 33/week @ 2024-11-04

98 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