blob: a8707040b87c27205939d118b987e85f89117f2e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
program encodeascii85;
{$mode objfpc}
{$H+}
uses SysUtils,Classes, ascii85;
Var
FN : String;
Enc : TAscii85EncoderStream;
Src,Dest : TFileStream;
begin
If (ParamCount=0) then
begin
Writeln('usage: encodeascii85 filename');
halt(1);
end;
FN:=ParamStr(1);
Src:=TFileStream.Create(FN,fmOpenRead);
try
FN:=FN+'.a85';
Dest:=TFileStream.Create(FN,fmCreate);
try
Enc:=TAscii85EncoderStream.Create(Dest,72,True);
try
Enc.CopyFrom(Src,0);
finally
Enc.Free;
end;
finally
Dest.Free;
end;
finally
Src.Free;
end;
end.
|