home *** CD-ROM | disk | FTP | other *** search
- program lzwtest;
-
- { author: gary conway and blake ragsdell }
- { this program compresses and uncompresses a file }
- { using lzw compression. }
-
- uses
- crt, dos,
- eco_lzw
-
- ;
-
- var
- lzw : lzwobj;
- inputfile : pathstr;
-
- begin
- clrscr;
- inputfile := paramstr(1);
- if length(inputfile) = 0 then begin
- writeln('Please include a filename on the command line.');
- halt
- end;
- writeln('Compressing ',inputfile,' into OUTPUT.PAS');
- with lzw do begin
- init;
- compressfile(inputfile,'OUTPUT.PAS');
- compressdone;
- clrscr;
- writeln('UnCompressing OUTPUT.PAS into RESTORED.PAS');
- init;
- uncompressfile('Output.PAS','Restored.PAS');
- compressdone
- end;
- end.
-
- {--- gecho 1.00/beta}
-