Home > Language Reference > Classes > StreamCipher

InitUnzip Method

Sets the encoding/decoding scheme to Inflate.

Syntax

Public Sub InitUnzip()

Remarks

The InitUnzip method sets the encoding/decoding scheme to Inflate, and allocates the necessary internal buffers. If the object was already initialized, buffers allocated for the previous encoding scheme are freed, and any pending data are lost.

Deflate and Inflate are lossless data compression and decompression algorithms that use a combination of the LZ77 algorithm and Huffman coding. They are widely used in many common file formats, such as zip, gzip, or PNG. Note the StreamCipher object does not handle those formats directly, but only provides the compression and decompression algorithms on which they rely. For example, to extract a file from an archive, you'll have to write your own code to open the archive, check its format, browse its directory, locate the compressed stream into it, and so on.

Although decompressing is much faster than compressing, inflating data is still a CPU intensive operation. To avoid bad user experience, it may be advised to display some kind of dialog box while decompressing to inform the user that a lengthy operation is running and that the device is not frozen.

Note: this mode only supports read operations. You cannot write data to a StreamCipher object whose scheme was set to Inflate.

System requirements

SystemMinimal versionRemarks
Palm OSPalm OS 3.0N/A