Sample code for 30+ languages & platforms
PowerBuilder

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 PowerBuilder Downloads

PowerBuilder
integer li_rc
integer li_Success
string ls_B64
oleobject loo_ZipData

li_Success = 0

ls_B64 = "UEsDBBQA ... AAALgQAAAAA"

loo_ZipData = create oleobject
li_rc = loo_ZipData.ConnectToNewObject("Chilkat.BinData")
if li_rc < 0 then
    destroy loo_ZipData
    MessageBox("Error","Connecting to COM object failed")
    return
end if
li_Success = loo_ZipData.AppendEncoded(ls_B64,"base64")
li_Success = loo_ZipData.WriteFile("qa_output/out.zip")
if li_Success <> 1 then
    Write-Debug "failed to write Zip file."
    destroy loo_ZipData
    return
end if



destroy loo_ZipData