Sample code for 30+ languages & platforms
Perl

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 Perl Downloads

Perl
use strict;
use warnings;
use Chilkat2;

my $b64 = 'UEsDBBQA ... AAALgQAAAAA';

my $zipData = Chilkat2::BinData->new;
my $success = $zipData->AppendEncoded($b64, 'base64');
$success = $zipData->WriteFile('qa_output/out.zip');
if (!$success) {
    print "failed to write Zip file.\n";
    exit;
}