diff options
author | Diego Nehab <diego@tecgraf.puc-rio.br> | 2007-10-11 21:16:28 +0000 |
---|---|---|
committer | Diego Nehab <diego@tecgraf.puc-rio.br> | 2007-10-11 21:16:28 +0000 |
commit | 52ac60af8132ae7e42151d3012a9607d7cadaf95 (patch) | |
tree | 95085f9f535d20b6686399af1ba284bb74ac89d3 /gem/ex11.lua | |
parent | e394956cde629e24ecdd285c4c13c206891fcec4 (diff) | |
download | luasocket-52ac60af8132ae7e42151d3012a9607d7cadaf95.tar.gz luasocket-52ac60af8132ae7e42151d3012a9607d7cadaf95.tar.bz2 luasocket-52ac60af8132ae7e42151d3012a9607d7cadaf95.zip |
Tested each sample.
Diffstat (limited to 'gem/ex11.lua')
-rw-r--r-- | gem/ex11.lua | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gem/ex11.lua b/gem/ex11.lua new file mode 100644 index 0000000..1cbf01f --- /dev/null +++ b/gem/ex11.lua | |||
@@ -0,0 +1,7 @@ | |||
1 | local input = source.chain( | ||
2 | source.file(io.open("input.bin", "rb")), | ||
3 | encode("base64")) | ||
4 | local output = sink.chain( | ||
5 | wrap(76), | ||
6 | sink.file(io.open("output.b64", "w"))) | ||
7 | pump.all(input, output) | ||