Gzip Component

Properties   Methods   Events   Configuration Settings   Errors  

The Gzip component implements a gzip compressor and decompressor. It is compliant with RFC 1952 and compatible with the UNIX gzip and gunzip utilities.

Syntax

nsoftware.IPWorksZip.Gzip

Remarks

The gzip file format is typically used only to archive a single file. Accordingly, the operation of the component is simpler than that of the other components.

To compress with the component, set ArchiveFile to the name of the gzip file to be created, and FileDecompressedName to the name of the file to be compressed. Finally, invoke Compress. To extract the file, first set ArchiveFile. FileDecompressedName may then be set; if not, it will automatically be set from the gzip file headers. Finally, invoke the Extract or Compress method.

.tar.gz files may be created or extracted in one step by using the Tar component. See the documentation for Tar for more details.

Example (Creating a Gzip File)


ZipControl.ArchiveFile = "c:\test.gz"
ZipControl.FileDecompressedName = "c:\test.txt"
ZipControl.Compress()
Example (Extracting from a Gzip File)


ZipControl.ArchiveFile = "c:\test.gz"
ZipControl.Scan()
ZipControl.FileDecompressedName = "c:\test.txt"
ZipControl.Extract()

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.
CompressionMethodThe compression method for the component to use.
ExtractToPathA base path to decompress to.
FileCompressedDateThe date and time of the compressed file, as stored within the gzip archive.
FileCompressedNameFilename, as stored inside of the archive.
FileDecompressedNameFile name to decompress to, or compress from.
FileDecompressedSizeGets the size of the file, as decompressed outside the archive.
FileInputDataThe data of the file to be compressed.
GzipData(Decompression only) The gzip file contents as a byte array.
HasMoreDataShows whether or not there is more data in the gzip archive.

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.
AppendAdds specified file to an existing archive.
CompressCreates the compressed gzip archive.
ConfigSets or retrieves a configuration setting.
ExtractExtracts the compressed file from the gzip archive.
ExtractAllExtracts all files from the compressed 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.
SetFileInputStreamThe input stream to read the decompressed data from.

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 a file is processed.
EndFileFired after a file is processed.
ErrorInformation about non-fatal errors.
OverwriteFired whenever a file exists and may be overwritten.
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.

CloseStreamAfterCompressIf true, the component will close the output stream after compression.
FileCommentHolds the comment associated with the archive.
PreserveModifiedTimeWhether or not to preserve the original modified time on extracted files.
WriteToProgressEventWhether or not to write data to the Progress Event.
BuildInfoInformation about the product's build.
GUIAvailableTells the component whether or not a message loop is available for processing events.
LicenseInfoInformation about the current license.
UseInternalSecurityAPITells the component whether or not to use the system security libraries or an internal implementation.

 
 
Copyright (c) 2021 /n software inc. - All rights reserved.
IPWorks ZIP 2020 .NET Edition - Version 20.0 [Build 7720]