CkPython
CkPython
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 CkPython Downloads
import sys
import chilkat
success = False
b64 = "UEsDBBQA ... AAALgQAAAAA"
zipData = chilkat.CkBinData()
success = zipData.AppendEncoded(b64,"base64")
success = zipData.WriteFile("qa_output/out.zip")
if (success != True):
print("failed to write Zip file.")
sys.exit()