ZCompress Class
Properties Methods Events Configuration Settings Errors
The ZCompress class implements an LZC compressor and decompressor. It is compatible with the UNIX compress utility.
Syntax
class ipworkszip.ZCompress
Remarks
The LZC file format is used only to archive a single file. Accordingly, the operation of the class is simpler than that of the other classs.
To compress with the class, set archive_file to the name of the LZC compressed file to be created, and file_decompressed_name to the name of the file to be compressed. Finally, invoke compress. To extract the file, first set archive_file. file_decompressed_name may then be set; if not, it will automatically be set based on the archive_file name. Finally, invoke the extract method.
Example (Creating an LZC File)
ZipControl.ArchiveFile = "c:\test.Z" ZipControl.FileDecompressedName = "c:\test.txt" ZipControl.Compress()Example (Extracting from an LZC File)
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 class with short descriptions. Click on the links for further details.
archive_file | The name of the zip, gzip, tar, or jar archive. |
file_decompressed_name | File name to decompress to, or compress from. |
file_input_data | The data of the file to be compressed. |
z_compress_data | (Decompression only) The LZC compressed file contents as a byte array. |
Method List
The following is the full list of the methods of the class 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 class. |
Event List
The following is the full list of the events fired by the class with short descriptions. Click on the links for further details.
on_begin_file | Fired before a file is processed. |
on_end_file | Fired after a file is processed. |
on_error | Information about non-fatal errors. |
on_overwrite | Fired whenever a file exists and may be overwritten. |
on_progress | Fired as progress is made. |
Configuration Settings
The following is a list of configuration settings for the class with short descriptions. Click on the links for further details.
WriteToProgressEvent | Whether or not to write data to the Progress Event. |
BuildInfo | Information about the product's build. |
CodePage | The system code page used for Unicode to Multibyte translations. |
LicenseInfo | Information about the current license. |
ProcessIdleEvents | Whether the class uses its internal event loop to process events when the main thread is idle. |
SelectWaitMillis | The length of time in milliseconds the class will wait when DoEvents is called if there are no events to process. |
UseInternalSecurityAPI | Tells the class whether or not to use the system security libraries or an internal implementation. |