Disponible

amalgame-encoding

Base64, Hex, percent-encoding.

amc package add encoding GitHub ↗ ← Retour à l'écosystème

Vue d'ensemble

Encodages courants : Base64 (standard + URL-safe), hexadécimal, percent-encoding (URL). Pure Amalgame, sans dépendance.

Caractéristiques

  • Base64 standard et URL-safe (avec/sans padding)
  • Hex encode/decode
  • Percent-encoding (URL component)
  • Aucune dépendance C
  • Utilisé par crypto, net-websocket, Mosaic

Exemple

Exemple minimal d'utilisation — recopiable tel quel après l'install.

amc package add encoding

let b64 = Encoding.Base64Encode("hello world")  // "aGVsbG8gd29ybGQ="
let hex = Encoding.HexEncode([0xDE, 0xAD, 0xBE, 0xEF])  // "deadbeef"

En bref

Packages liés