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, |
Declaration (DLL API) | |
---|---|
int XzGetZipFileInformation( HXCEEDZIP hZip, LONG* plNBFiles, LONG* plCompressedSize, LONG* plCompressedSizeHigh, LONG* int XzGetZipFileInformation64( HXCEEDZIP hZip, VARIANT* vaNBFiles, VARIANT* vaCompressedSize, VARIANT* vaCompressedSizeHigh, |
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 |
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.
If the zip file spans multiple disks, the InsertDisk event will be triggered in order to request the last disk of the set.
Use the ListZipContents method to get information on the files contained in the zip file, as opposed to general statistics on the zip file.