IPWorks ZIP 2020 Python Edition

Questions / Feedback?

use_gzip_compression Property

Whether or not to use gzip compression.

Syntax

def get_use_gzip_compression() -> bool: ...
def set_use_gzip_compression(value: bool) -> None: ...

use_gzip_compression = property(get_use_gzip_compression, set_use_gzip_compression)

Default Value

FALSE

Remarks

If this property is set to true, the class will operate on tar archives that have been compressed with gzip. The interface of the component remains the same. During compression, the data will be streamed through a gzip compressor as it is written to the file. During decompression, the class will unzip the data to a temporary tar archive, and then automatically scan or decompress the tar archive.

The creation of the temporary tar file will occur when the scan method is invoked (note that this method is invoked automatically by extract and extract_all if it is not invoked explicitly by the user). The entire file must be decompressed, so scan might operate slowly, and the on_progress event will be fired as the tar file is extracted. If scan is invoked automatically by extract or extract_all, the PercentProcessed parameter of the event will increase from 0 to 100 as the archive is decompressed, and again as files are extracted from the temporary file.

The temporary file will automatically be deleted by the class after it is no longer needed. To extract the tar file itself (rather than its contents), the Gzip class should be used.

Due to the nature of the gzip format, append and delete are not supported for .tar.gz files.

If this property is set to false, the class will create and read ordinary, uncompressed tar archives.

NOTE: This is not supported when using an input stream for extraction.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks ZIP 2020 Python Edition - Version 20.0 [Build 8300]