Xceed Zip for COM/ActiveX on x86/x64 Documentation
Example topics
/ GetZipFileInformation method example for Delphi
In This Topic
GetZipFileInformation method example for Delphi
In This Topic
This example gets information for the zip file named "C:\test\My zip file.zip", and puts the data in various variables that you can use. The example assumes you have placed a button, a listbox and an Xceed Zip control on a form, named Button1, List1 and XceedZip1 respectively.
' Set the zip file name (the only property required to be set here) XceedZip1.ZipFilename := 'c:\test\My zip file.zip';
' Get the information ResultCode := XceedZip1.GetZipFileInformation(TotalFiles, CompressedBytes, UncompressedBytes, CompressionRatio, IsZipFileSpanned);
' Check the return value If ResultCode <> xerSuccess Then ListBox1.Items.Add("Unsuccessful. Error #" + Str(ResultCode) else begin ListBox1.Items.Add("Successfully got the zip file's info"); ListBox1.Items.Add("Total files: " + IntToStr(TotalFiles)); ListBox1.Items.Add("Comp. size: " + IntToStr(CompressedBytes)); ListBox1.Items.Add("Size: " + IntToStr(UncompressedBytes)); ListBox1.Items.Add("Ratio: " + IntToStr(CompressionRatio)+"%"); ListBox1.Items.Add("Spanned: " + IntToStr(IsZipFileSpanned)); end; end; end;