Description
Fast implementation of the Bech32 encoding format.
Description
Please see the README on GitHub at https://github.com/cardanosolutions/ogmios/tree/master/server/modules/fast-bech32
README.md
fast-bech32
Overview
An optimized implementation of the bech32 encoding format (checksumed base32 with human-readable prefixes).
Usage
import Data.ByteString.Bech32
( HumanReadablePart(..), encodeBech32 )
encodeAddress :: ByteString -> Text
encodeAddress = encodeBech32 (HumanReadablePart "addr")
Benchmarks
Bytestring length (bytes) | bech32 | fast-bech32 |
---|---|---|
10 | 8.085μs | 0.875μs |
100 | 60.83μs | 2.181μs |
1000 | 664.1μs | 33.05μs |