Data formats · real, tested code

Encode and Decode Base64 in Larzscript

Base64-encode arbitrary text (or decode it back), the standard way binary-ish data travels safely through text-only channels like JSON or URLs.

A single pure-Larzscript implementation, no OS or library call.

larzscript pkg install base64

Code

import "base64" as base64

let encoded = base64.encode("Larzscript is money-native")
print(encoded)
print(base64.decode(encoded))
Output
TGFyenNjcmlwdCBpcyBtb25leS1uYXRpdmU=
Larzscript is money-native