@hackage fast-bech321.0.1
Fast implementation of the Bech32 encoding format.
Categories
License
MPL-2.0
Maintainer
matthias.benkort@gmail.com
Links
Versions
Installation
Dependencies (4)
- base >=4.17 && <5
- bytestring
- relude
- text Show all…
Dependents (0)
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 |