Contributor: ARNE DE BRUIJN
{
JD> This 'base64' encoding is new to me. Anybody out there who has an
JD> algorithm or code.
=== UNBASE64.PAS
{ Decode base-64 files, Arne de Bruijn, 1996, Released to the Public Domain }
{ Strip everything but the base-64 lines before feeding it into this program }
uses dos;
var
Base64:array[43..122] of byte;
var
T:text;
Chars:set of char;
S:string;
K,I,J:word;
Buf:pointer;
DShift:integer;
F:file;
B,B1:byte;
Decode:array[0..63] of byte;
Shift2:byte;
Size,W:word;
begin
FillChar(Base64,SizeOf(Base64),255);
J:=0;
for I:=65 to 90 do
begin
Base64[I]:=J;
Inc(J);
end;
for I:=97 to 122 do
begin
Base64[I]:=J;
Inc(J);
end;
for I:=48 to 57 do
begin
Base64[I]:=J;
Inc(J);
end;
Base64[43]:=J; Inc(J);
Base64[47]:=J; Inc(J);
if ParamCount=0 then
begin
WriteLn('UNBASE64 [