Sample code for 30+ languages & platforms
Unicode 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 Unicode C Downloads

Unicode C
#include <C_CkBinDataW.h>

void ChilkatSample(void)
    {
    BOOL success;
    const wchar_t *b64;
    HCkBinDataW zipData;

    success = FALSE;

    b64 = L"UEsDBBQA ... AAALgQAAAAA";

    zipData = CkBinDataW_Create();
    success = CkBinDataW_AppendEncoded(zipData,b64,L"base64");
    success = CkBinDataW_WriteFile(zipData,L"qa_output/out.zip");
    if (success != TRUE) {
        wprintf(L"failed to write Zip file.\n");
        CkBinDataW_Dispose(zipData);
        return;
    }



    CkBinDataW_Dispose(zipData);

    }