#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

#1241 in Encoding

47 downloads per month
Used in solana-cli-explorer

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