Swift
Swift
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 Swift Downloads
func chilkatTest() {
var success: Bool = false
var b64: String? = "UEsDBBQA ... AAALgQAAAAA"
let zipData = CkoBinData()!
success = zipData.appendEncoded(encData: b64, encoding: "base64")
success = zipData.writeFile(path: "qa_output/out.zip")
if success != true {
print("failed to write Zip file.")
return
}
}