[Lua] Adds some useful encoding APIs for Lua (base64 encoding and decoding and such).

This commit is contained in:
Zef Hemel
2025-08-20 13:39:34 +02:00
parent 90487746fd
commit c16dbc12fb
5 changed files with 48 additions and 1 deletions
+13
View File
@@ -0,0 +1,13 @@
The `encoding` API implements a few useful functions to handle various types of encoding.
### encoding.base64Encode(data)
Encodes data (either a string or byte buffer) as a base64 encoded string.
### encoding.base64Decode(s)
Decodes a base64 encoded string into a byte buffer.
### encoding.utf8Encode(s)
Encodes a (UTF-8) string into a byte buffer.
### encoding.utf8Decode(data)
Decodes a byte buffer into a (UTF-8) string.