implementation
uses AbZipper,AbZipTyp,AbUtils;
{$R *.lfm}
{ TForm1 }
procedure TForm1.Button1Click(Sender: TObject);
var
Zip : TAbZipper;
x: Integer;
begin
Zip := TAbZipper.Create(Application);
Zip.ArchiveType := atZip;
Zip.FileName := '/tmp/testAbbrevia.zip';
Zip.AddFiles('/home/jurassic/tmp/*',1);
Zip.ZipfileComment := 'Abbrevia test';
Zip.CompressionMethodToUse := smBestMethod;
zip.DeflationOption := doMaximum;
zip.Save;
Memo1.Clear;
Memo1.Lines.Append('Number of Files : ' + InttoStr(zip.Count));
Memo1.Lines.Append('-----------------------------------------');
For x:= 0 to zip.count - 1 do
begin
Memo1.Lines.Append('File : ' + zip.Items[x].FileName);
Memo1.Lines.Append('Uncompressed Size : ' +
InttoStr(zip.Items[x].UncompressedSize));
Memo1.Lines.Append('Compression Ratio : ' +
FloattoStr(zip.Items[x].CompressionRatio));
Memo1.Lines.Append('Compressed Size : ' +
InttoStr(zip.Items[x].CompressedSize));
Memo1.Lines.Append('CRC32 : ' + Inttohex(zip.Items[x].CRC32,8));
memo1.Lines.Append('======================================');
end;
zip.CloseArchive;
end;