ZCompress Bean
Properties Methods Events Configuration Settings Errors
The ZCompress component implements an LZC compressor and decompressor. It is compatible with the UNIX compress utility.
Syntax
IPWorksZip.Zcompress
Remarks
The LZC file format is used only to archive a single file. Accordingly, the operation of the bean is simpler than that of the other beans.
To compress with the bean, set ArchiveFile to the name of the LZC compressed 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 based on the ArchiveFile name. Finally, invoke the Extract method.
Example (Creating an LZC File)
ZipControl.ArchiveFile =
"c:\test.Z"
ZipControl.FileDecompressedName =
"c:\test.txt"
ZipControl.Compress()
ZipControl.ArchiveFile =
"c:\test.Z"
ZipControl.FileDecompressedName =
"c:\test.txt"
ZipControl.Extract()
Property List
The following is the full list of the properties of the bean with short descriptions. Click on the links for further details.
ArchiveFile | The name of the zip, gzip, tar, or jar archive. |
FileDecompressedName | File name to decompress to, or compress from. |
FileInputData | The data of the file to be compressed. |
ZCompressData | (Decompression only) The LZC compressed file contents as a byte array. |
Method List
The following is the full list of the methods of the bean with short descriptions. Click on the links for further details.
abort | Aborts the current operation. |
compress | Creates the compressed archive. |
config | Sets or retrieves a configuration setting . |
extract | Extracts the compressed file from the archive. |
reset | Resets the component. |
setArchiveInputStream | The stream to read the zip, tar, jar, or gzip archive from. |
setArchiveOutputStream | The stream to write the zip, tar, jar, or gzip archive to. |
setFileInputStream | The input stream to read the decompressed data from. |
Event List
The following is the full list of the events fired by the bean with short descriptions. Click on the links for further details.
BeginFile | Fired before a file is processed. |
EndFile | Fired after a file is processed. |
Error | Information about non-fatal errors. |
Overwrite | Fired whenever a file exists and may be overwritten. |
Progress | Fired as progress is made. |
Configuration Settings
The following is a list of configuration settings for the bean with short descriptions. Click on the links for further details.
WriteToProgressEvent | Whether or not to write data to the Progress Event. |
CodePage | The system code page used for Unicode to Multibyte translations. |