IPWorks ZIP 2020 Python Edition

Questions / Feedback?

compress_data Method

Compresses the specified data.

Syntax

def compress_data() -> None: ...

Remarks

This method compresses the data specified by input_data. After calling this method output_data holds the compressed data.

The on_compress_data and decompress_data methods operate on the complete blob of data. The entire compressed or decompressed data must be set to input_data before calling either method.

To compress and decompress data in blocks (chunks) see compress_block and decompress_block.

Compress Data

Set input_data to the decompressed data. This should be the entire data to be compressed. Next call on_compress_data. After compression output_data will hold the compressed data. For example:


zipstream.InputDataB = MyDecompressedData;
zipstream.CompressData();
MyCompressedData = zipstream.OutputDataB;

In addition to output_data, the compressed data may also be accumulated within the on_compressed_data event.

Decompress Data

Set input_data to the compressed data. This should be the entire data to be decompressed. Next call decompress_data. After decompression output_data will hold the decompressed data. For example:


zipstream.InputDataB = MyCompressedData;
zipstream.DecompressData();
MyDecompressedData = zipstream.OutputDataB;

In addition to output_data, the compressed data may also be accumulated within the on_decompressed_data event.

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