2012-12-13 44 views

回答

1

你可以做這樣的事情與LuaSocket:

local ltn12 = require "ltn12" 
local mime = require "mime" 

mystring = "somedata" 
myoutfile = "out.gif" 

ltn12.pump.all(
    ltn12.source.string(mystring), 
    ltn12.sink.chain(
    mime.decode("base64"), 
    ltn12.sink.file(io.open(outfile,"w")) 
) 
) 
+0

我會試試這個,謝謝 – WestLakeBoy

+0

它的工作原理,謝謝 – WestLakeBoy

相關問題