JavaScript
JavaScript
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.
Note
This example is intended for running within a Chilkat.Js embedded JavaScript engine. All Chilkat JavaScript examples require Chilkat
v11.4.0 or greater.
var success = false;
var b64 = "UEsDBBQA ... AAALgQAAAAA";
var zipData = new CkBinData();
success = zipData.AppendEncoded(b64,"base64");
success = zipData.WriteFile("qa_output/out.zip");
if (success !== true) {
console.log("failed to write Zip file.");
return;
}