#! /usr/bin/perl -w


use MIME::Base64;

if (!defined $ARGV[0]) { die "No file specified\n";}

`paq8l -2 $ARGV[0]`;
#print "coding done\n";
$codefile = $ARGV[0] . ".paq8l";

my $text = `cat $codefile`;
#print "cat done\n";
$outstr = encode_base64($text, "\n");

#print "64coded:\n";
#print $outstr;

open (OUT, ">$ARGV[0].864");
print OUT $outstr;
#print "done\n";
close (OUT);
unlink $codefile;
