Help for this page

Select Code to Download


  1. or download this
    my $packer = 'bzip2';
    my $file = 'data.txt.bz2';
    
    open my $fh, "$packer -cd $file |"
        or die "Couldn't decompress '$file': $!/$?";
    
  2. or download this
    use strict;
    my %charmap = (
    ...
    my $decompressed = unpack 'b*', $compressed;
    
    print "$decompressed\n";