C
C
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 C Downloads
#include <C_CkBinData.h>
void ChilkatSample(void)
{
BOOL success;
const char *b64;
HCkBinData zipData;
success = FALSE;
b64 = "UEsDBBQA ... AAALgQAAAAA";
zipData = CkBinData_Create();
success = CkBinData_AppendEncoded(zipData,b64,"base64");
success = CkBinData_WriteFile(zipData,"qa_output/out.zip");
if (success != TRUE) {
printf("failed to write Zip file.\n");
CkBinData_Dispose(zipData);
return;
}
CkBinData_Dispose(zipData);
}