program Archiver;

{$APPTYPE CONSOLE}

uses
  windows,
  messages,
  sysUtils,
  crt32,
  arc;

var
  file1, file2: string;
  c: char;
begin
  clrscr;
  write('Do you want to [c]ompress or [u]ncompress?');
  repeat
    c := readkey;
  until (c = 'c') or (c = 'u') or (c = #27);
  if (c = #27) then
    halt
  else if (c = 'c') then
  begin
    writeln;
    writeln('File name: ');
    System.readln(file1);
    writeln('Archive name: ');
    System.readln(file2);
    DoCompress(file1, file2);
  end
  else if (c = 'u') then
  begin
    writeln;
    writeln('Atchive name: ');
    System.readln(file1);
    writeln('File name: ');
    DoUnCompress(file1, file2);
  end;
end.
