bech32

Fast Haskell bech32, bech32m encoding/decoding (docs.ppad.tech/bech32).
git clone git://git.ppad.tech/bech32.git
Log | Files | Refs | README | LICENSE

commit 63daac7fb3b177cb314fc67441775caab0ed6b28
parent dbd32a5726d25cdf168f210a66a0bf602980b683
Author: Jared Tobin <jared@jtobin.io>
Date:   Sat, 10 Oct 2026 15:52:45 +0400

lib: drop intermediate append in bech32 encode

Diffstat:
Mlib/Data/ByteString/Bech32/Internal.hs | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/Data/ByteString/Bech32/Internal.hs b/lib/Data/ByteString/Bech32/Internal.hs @@ -204,7 +204,7 @@ encode enc (BS.map to_lower -> hrp) dat = do let !ws = encode_with w5_tab dat guard (BS.length hrp + BS.length ws + 7 <= 90) let !chk = create_checksum enc hrp ws - pure $! BS.concat [hrp, BS.singleton 0x31, as_base32 (ws <> chk)] + pure $! BS.concat [hrp, BS.singleton 0x31, as_base32 ws, as_base32 chk] -- | Decode a bech32 or bech32m string into its (lowercase) -- human-readable part and base256 data part. All-uppercase input