Data & codecs3 exports
Raw Markdown/base64
RFC 4648 standard and URL-safe Base64 encoding and decoding for strings and byte slabs.
Functions & symbols#
decode-base64#
function
Decodes a Base64 string into a UTF-8 `String`.
| Parameter | Type | Optional | Description |
|---|---|---|---|
encoded | String | required | Base64-encoded string |
Returns:
Any(base64/decode-base64 "aGVsbG8=") ; -> "hello"decode-base64-slab#
function
Decodes a Base64 string into raw binary `Slab` bytes.
| Parameter | Type | Optional | Description |
|---|---|---|---|
encoded | String | required | Base64-encoded string |
Returns:
Any(let raw (base64/decode-base64-slab b64))encode-base64#
function
Encodes a `String` or byte `Slab` into standard Base64.
| Parameter | Type | Optional | Description |
|---|---|---|---|
input | String | Slab | required | UTF-8 text or binary Slab |
Returns:
Any(base64/encode-base64 "hello") ; -> "aGVsbG8="