Sample code for 30+ languages & platforms
Lua

Decode Base64 to Zip File

See more Base64 Examples

Shows how to decode a baes64 string that is the encoded representation of the bytes that make up a .zip archive. Decodes the base64 and writes the .zip file.

Chilkat Lua Downloads

Lua
local chilkat = require("chilkat")

local b64 = "UEsDBBQA ... AAALgQAAAAA"

local zipData = chilkat.BinData.new()
local success = zipData:append_encoded(b64, "base64")
success = zipData:write_file("qa_output/out.zip")
if not success then
    print("failed to write Zip file.")
    return
end