IP*Works! ZIP V9 - Online Help
IP*Works! ZIP V9
Questions / Feedback?

Zip Component

Properties   Methods   Events   Configuration Settings   Errors  

The Zip component implements a PKZip-compatible Zip compressor and decompressor.

Syntax

nsoftware.IPWorksZip.Zip

Remarks

The component uses the Deflate algorithm specified in RFC 1951 for compression, and produces and reads output compatible with PKZip, WinZip, etc.

To create a new archive, first set the ArchiveFile property to the name of the archive to be created. Then, specify the files to be compressed either by invoking IncludeFiles, or by adding a new object to the Files collection and setting the values of the DecompressedName and CompressedName. fields. Finally, call the Compress method to create the archive.

To decompress an existing archive, set ArchiveFile to the name of the archive to be decompressed. The ExtractToPath property may be set, and then calling the ExtractAll method will decompress all files in the archive to this path.

For finer control, the Scan method should be used to read the file information stored in the archive. This will fill out the information in the Files collection. The values of DecompressedName may then be changed if desired. Finally, ExtractAll may be used to decompress the entire archive, or Extract may be used for finer control.

Data may be streamed out by setting WriteToProgressEvent to true. Then, the Progress event may be trapped to retrieve the data.

Example (Creating an Archive)


ZipControl.ArchiveFile = "c:\test.zip"
ZipControl.RecurseSubdirectories = true
ZipControl.IncludeFiles("c:\foo\*")
ZipControl.Compress()

Example (Extracting from an Archive)


ZipControl.ArchiveFile = "c:\temp.zip"
ZipControl.ExtractToPath = "c:\extracted\"
ZipControl.ExtractAll()

Property List


The following is the full list of the properties of the component with short descriptions. Click on the links for further details.

ArchiveFileThe name of the zip, gzip, tar, or jar archive.
CompressionLevelThe compression level to use.
EncryptionAlgorithmThe algorithm used to encrypt files written to the archive.
ExcludedFilesA list of files to exclude.
ExtractToPathA base path to decompress to.
FilesCollection of Zip archive files.
OverwriteFilesWhether or not to overwrite files.
PasswordA password for the zip archive.
RecurseSubdirectoriesWhether or not to recurse into subdirectories.
ZipCommentThe comment for the entire zip file.
ZipData(Decompression only) The zip file contents as a byte array.

Method List


The following is the full list of the methods of the component with short descriptions. Click on the links for further details.

AbortAborts the current operation.
AppendFilesAdds specified files to an existing archive.
CompressCreates the compressed archive.
ConfigSets or retrieves a configuration setting .
DeleteDeletes one or more files from an existing archive.
ExtractExtracts a single file, directory, or group of files, from the archive.
ExtractAllExtracts all files from the compressed archive.
IncludeFilesSpecifies that the indicated files should be added to the archive.
ResetResets the component.
ScanScans the compressed archive.
SetArchiveInputStreamThe stream to read the zip, tar, jar, or gzip archive from.
SetArchiveOutputStreamThe stream to write the zip, tar, jar, or gzip archive to.
UpdateWill update certain files in an archive.

Event List


The following is the full list of the events fired by the component with short descriptions. Click on the links for further details.

BeginFileFired before each file is processed.
EndFileFired after each file is processed.
ErrorInformation about non-fatal errors.
OverwriteFired whenever a file exists and may be overwritten.
PasswordFired when a file is encrypted, and the file's password is incorrect.
ProgressFired as progress is made.

Configuration Settings


The following is a list of configuration settings for the component with short descriptions. Click on the links for further details.

AESGenerateUniqueKeysWhether to generate unique keys for each file encrypted.
EnableStreamingEncryptionWhether to allow streaming and encryption simultaneously.
FileHashAlgorithmThe algorithm used to generate a hash of each file during compression.
Files[i].FileHashThe hash generated for each file during compression.
ForceZip64FormatWhether to explicitly compress a Zip64 format archive.
MarkAsTextWhether to mark files as text files.
PreserveModifiedTimeWhether or not to preserve the original modified time on extracted files.
RecalculateCRCWhether to recalculate the CRC.
WriteToProgressEventWhether or not to write data to the Progress Event.
CompressionMethodUsed to set the method of compression.
ExcludedAttributesAttributes of files to be excluded.
ExtractFilesOnlyWhether to only extract the files contained within the archive.
OverwriteReadonlyFilesWhether to overwrite readonly files.
CodePageThe system code page used for Unicode to Multibyte translations.

 
 
Copyright (c) 2017 /n software inc. - All rights reserved.
Build 9.0.6240.0