VBZip is a ActiveX control designed to allow developers to add standard ZIP compression and decompression to their own application.
Installation
Data
Types
Methods
Properties
Events
Legal Stuff
The following files are required when using the control
VBZip_Control.ocx - The actual ActiveX controlZipit.dll } Dll required to access InfoZip dlls (Working on how to by-pass this in later versions)Zipdll.dll } Info-Zip dllsUnzdll.dll }
Used to specify what action to take when zipping and unzipping
Public Enum ZipAction zipDefault = 1 zipFreshen = 2 zipUpdate = 3End Enum
Used to specify the compression level
Public Enum ZipLevel zipStore = 0 zipLevel1 = 1 zipSuperFast = 2 zipFast = 3 zipLevel4 = 4 zipNormal = 5 zipLevel6 = 6 zipLevel7 = 7 zipLevel8 = 8 zipMax = 9End Enum
Contains the file information for archive entries
Public Version As IntegerPublic Flag As IntegerPublic CompressionMethod As IntegerPublic FileDateTime As Date 'was StringPublic CRC32 As LongPublic CompressedSize As LongPublic UncompressedSize As LongPublic FileNameLength As IntegerPublic ExtraFieldLength As IntegerPublic Filename As String
Public Sub About()
Displays information about the control
Public Function ConvertBytesToString(Bytes As Long) As String
Returns a string representing the number of bytes, using 'x bytes', 'x KB' and 'x MB' as appropriate
Bytes - number of bytes to be represented
Public Function Add(Files As Collection, ByVal Action As ZipAction, _ ByVal StorePathInfo As Boolean, ByVal RecurseSubFolders As Boolean, _ ByVal UseDOS83 As Boolean, ByVal CompressionLevel As ZipLevel) As Long
Adds the specified files to the archive and returns the number of files successfully added
Files - collection of strings containing the path and filename to addAction - ZipAction representing the action to be performedStorePathInfo - if TRUE stores path information in the archiveRecurseSubFolders - NO EFFECTUseDOS83 - if TRUE files are stored in DOS 8.3 formatCompressionLevel - ZipLevel representing the compression level required
Public Function Delete(Files As Collection) As Long
Deletes the specified files from the archive and returns the number of files successfully deleted
Files - collection of strings containing the filenames of files to delete
Public Function Extract(Files As Collection, ByVal Action As ZipAction, _ByVal UsePathInfo As Boolean, ByVal Overwrite As Boolean, ByVal Path As String) As Long
Extracts specified files from the archive, returning the number of files extracted
Files - collection of strings containing the filenames of the files to extractAction - ZipAction representing the action to be performedUsePathInfo - if TRUE the path structure will be recreated when extracting filesOverwrite - if TRUE files will be overwritedPath - the path files are extracted to (must exist at the moment) Public Function GetEntry(ByVal Index As Long) As ZipFileEntry
Returns a ZipFileEntry representing the file Index containing its file information
Index - index of file in the archive
Public Function GetEntryNum() As Long
Returns the number of files (and, in some archives, directory entries) contained within the archive
Public Function ParseFilename(ByVal Path As String) As String
Returns the filesname from a full file specification
Path - full file specification to parse
Public Function ParsePath(Path As String) As String
Returns the path from a full file specification
Path - full file specification to parse
Public Function Read() As Long
Re-reads the archive and returns the number of
files (and, in some archives, directory entries) the archive contains
This
method is called automatically when the Filename property is changed
Filename
Set and get the current archive, setting this property causes the Read method to be called
OnArchiveUpdate()
Raised when the archive is changed or a new archive is loaded
OnZipProgress(ByVal Percentage As Integer, ByVal Filename As String)
Raised before each file is zipped up during a zip operation
OnZipComplete(ByVal Successful As Long)
Raised after a zip operation completes
OnUnzipProgress(ByVal Percentage As Integer, ByVal Filename As String)
Raised before each file is unzipped during a unzip operation
OnUnzipComplete(ByVal Successful As Long)
Raised after the completion of a unzip operation
OnDeleteProgress(ByVal Percentage As Integer, ByVal Filename As String)
Raised before each file is deleted during a deletion operation
OnDeleteComplete(ByVal Successful As Long)
Raised after the completion of a deletion operation
Info-Zip Dlls (Zipdll.dll &
Unzdll.dll)
Copyright (c) 1990-1999 Info-ZIP. All rights reserved.
Please
read licence.txt for more information
Although I am releasing this software as freeware,
if you use any part of it please give credit.
A phrase such as 'Uses code
from Richsoft Computing www.richsoftcomputing.btinternet.co.uk' is sufficient.
Good luck