Sample code for 30+ languages & platforms
Delphi DLL

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 Delphi DLL Downloads

Delphi DLL
uses
    Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
    Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, BinData;

...

procedure TForm1.Button1Click(Sender: TObject);
var
success: Boolean;
b64: PWideChar;
zipData: HCkBinData;

begin
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) then
  begin
    Memo1.Lines.Add('failed to write Zip file.');
    Exit;
  end;

CkBinData_Dispose(zipData);

end;