Xceed Zip Compression Library Documentation
GetZipFileInformation method
Xceed Zip control reference > Xceed Zip control methods > GetZipFileInformation method

Description

The GetZipFileInformation method allows you to obtain some general statistics about the zip file specified in the ZipFilename property.

The method returns the zip file information by modifying the parameters you pass to the function – the contents of the parameters are never checked by the GetZipFileInformation method.

Since the GetZipFileInformation method provides byte/size information, it has a 64-bit counterpart that can report these sizes even if they get beyond 4 gigabytes.

Declaration (ActiveX)  
Method GetZipFileInformation(lNbFiles As Long, lCompressedSize As Long, lUncompressedSize As Long,
nCompressionRatio As Integer, bSpanned As Boolean) As xcdError

Method GetZipFileInformation64(vaNbFiles As Variant, vaCompressedSizeLow As Variant, vaCompressedSizeHigh As Variant,
vaUncompressedSizeLow As Variant, vaUncompressedSizeHigh As Variant, vaCompressionRatio As Variant,
vaSpanned As Variant) As xcdError
Declaration (DLL API)  
int XzGetZipFileInformation( HXCEEDZIP hZip, LONG* plNBFiles, LONG* plCompressedSize, LONG* plCompressedSizeHigh, LONG* 
plUncompressedSize, LONG* plUncompressedSizeHigh, SHORT* pnCompressionRatio, BOOL* pbSpanned )
int XzGetZipFileInformation64( HXCEEDZIP hZip, VARIANT* vaNBFiles, VARIANT* vaCompressedSize, VARIANT* vaCompressedSizeHigh, 
VARIANT* vaUncompressedSize, VARIANT* vaUncompressedSizeHigh, VARIANT* vaCompressionRatio,
VARIANT* vaSpanned )

Parameters

Parameter Description
lNbFiles / vaNbFiles Total number of files contained in the zip file
lCompressedSize / vaCompressedSize Total compressed size of all the data in the zip file, in bytes.
lCompressedSizeLow
vaCompressedSizeHigh (64)
The 32 low-order and high-order bits representing the total compressed size of all the data in the zip file, in bytes.
lUncompressedSize / vaUncompressedSize Total uncompressed size of the data in the zip file, in bytes.
lUncompressedSizeLow
vaUncompressedSizeHigh (64)
The 32 low-order and high-order bits representing the total uncompressed size of the data in the zip file, in bytes.
nCompressionRatio / vaCompressionRatio The compression ratio achieved by this zip file
bSpanned / vaSpanned Returns true if the zip file spans multiple disks

Return values

A return value of type xcdError is returned. Only the return value of xerSuccess indicates that the method has been completed successfully. See the error codes topic for a list of possible return values.

Remarks

If the zip file spans multiple disks, the InsertDisk event will be triggered in order to request the last disk of the set.

Applicable properties

Abort, ZipFilename

Events triggered

InsertDisk, Warning

Related topics

Use the ListZipContents method to get information on the files contained in the zip file, as opposed to general statistics on the zip file.