sixtytwo

Package VersionHex Docs

Base62 encoding and decoding for Gleam, targeting both Erlang and JavaScript.

Uses the standard 0-9A-Za-z alphabet with Bitcoin/base-x style leading zero preservation, compatible with base-x.

Usage

gleam add sixtytwo
import sixtytwo

sixtytwo.encode(<<"hello":utf8>>)
// -> "7tQLFHz"

sixtytwo.decode("7tQLFHz")
// -> Ok(<<"hello":utf8>>)

Further documentation can be found at https://hexdocs.pm/sixtytwo.