PathrockNetwork Gno Explorer
HomeBlocksTransactionsTokensRealmsPackagesValidatorsAnalytics

PathrockNetwork Gno Explorer — an independent explorer for Gno.land Mainnet (gnoland-1), operated by PathrockNetwork. Not an official Gno.land service.

gnowebarchive RPC

gno.land/p/moul/x/daily/base32/v0

Package
Open in gnoweb ↗

Overview

Kind
Pure package
Name
v0
Namespace
moul / x / daily / base32
Files
3 (README)(gnomod.toml)
Exported functions
n/a — not supported for pure packages by the node (vm/qfuncs)
Module
gno.land/p/moul/x/daily/base32/v0
gno
0.9

Files (3)

  • README.mdmarkdown
  • gnomod.tomltoml
  • base32.gnogno
README.mdPreviewRaw
# `gno.land/p/moul/x/daily/base32/v0`

**RFC 4648 and Crockford base32** — `Encode`, `EncodeUnpadded`,
`EncodeCrockford`, `Decode`, `DecodeCrockford`.

```go
import "gno.land/p/moul/x/daily/base32/v0"

base32.Encode("foobar")           // "MZXW6YTBOI======"
base32.EncodeCrockford("hello")   // "D1JPRV3F"
base32.DecodeCrockford("d1-jprv3f")  // "hello" — case folded, hyphen ignored
```

**Two alphabets, for two different jobs.** RFC 4648 (`A–Z`, `2–7`, `=` padding)
is the interoperable one — use it when something else has to decode the result.
Crockford (`0–9`, `A–Z` minus `I`, `L`, `O`, `U`) is designed to be **read aloud
and typed back**: decoding folds case, reads `I`/`L` as `1` and `O` as `0`, and
ignores hyphens, so a mis-heard identifier still decodes. `U` is excluded to
avoid accidental obscenities.

Verified against the **RFC 4648 §10 vectors** at every partial-group length, and
the demo's pinned output is that vector set — so the example doubles as a
conformance test.

Decoding is strict where it matters: leftover bits after the final byte must be
**zero padding, never data**, so `"MB"` is rejected rather than silently
truncated. It is lenient where it is safe: lowercase and missing padding are
accepted.

Base32 costs 60% expansion (8 characters per 5 bytes) against base64's 33%. You
pay that to get an alphabet that survives case-insensitive systems and the
telephone.

**Live demo:** [`r/moul/x/daily/base32demo`](https://github.com/moul/gno-contracts/tree/main/r/moul/x/daily/base32demo/v0)
· render it at [`/r/moul/x/daily/base32demo/v0`](https://gno.land/r/moul/x/daily/base32demo/v0).

<!-- BEGIN GNOCONTRACTS FOOTER (generated by `make readmes`; do not edit below) -->

---

Part of **[moul/gno-contracts](https://github.com/moul/gno-contracts)** — moul's versioned gno.land contracts. See the repository for the full catalog, build/test tooling, and usage.

> 🧪 **Highly experimental — potentially vibe-coded.** Not audited; may break, change, or be removed at any time. Do not use with anything of value. Full disclaimer: [DISCLAIMER](https://github.com/moul/gno-contracts/blob/main/DISCLAIMER.md).

<!-- END GNOCONTRACTS FOOTER -->

Functions

not supported for pure packages by the node (vm/qfuncs)

Signatures reconstructed verbatim from vm/qfuncs — interface params keep their inline definitions.