diff options
| -rw-r--r-- | etc/b64.lua | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/etc/b64.lua b/etc/b64.lua new file mode 100644 index 0000000..7a4607d --- /dev/null +++ b/etc/b64.lua | |||
| @@ -0,0 +1,8 @@ | |||
| 1 | local base64 = socket.mime.base64.encode() | ||
| 2 | local split = socket.mime.split() | ||
| 3 | local convert = socket.mime.chain(base64, split) | ||
| 4 | while 1 do | ||
| 5 | local chunk = io.read(4096) | ||
| 6 | io.write(convert(chunk)) | ||
| 7 | if not chunk then break end | ||
| 8 | end | ||
