luasocket/gem/ex11.lua

8 lines
195 B
Lua
Raw Normal View History

2007-10-11 23:16:28 +02:00
local input = source.chain(
source.file(io.open("input.bin", "rb")),
2007-10-11 23:16:28 +02:00
encode("base64"))
local output = sink.chain(
wrap(76),
2007-10-11 23:16:28 +02:00
sink.file(io.open("output.b64", "w")))
pump.all(input, output)