Expand description
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 |
Modules§
Enums§
Functions§
- decode_
32 - Decodes the given base58 string into 32 bytes using an optimized decoding algorithm. This function will return an error if the string is not base58 encoded or the result is not 32 bytes.
- decode_
64 - Decodes the given base58 string into 64 bytes using an optimized decoding algorithm. This function will return an error if the string is not base58 encoded or the result is not 64 bytes.
- encode_
32 - Encodes the given 32 bytes using an optimized base58 encoding algorithm.
- encode_
64 - Encodes the given 64 bytes using an optimized base58 encoding algorithm.