compress.zlib Package

Function Description

A zlib compression and decompression library is provided.

This package uses the Huawei deflate algorithm, supports the deflate-raw and gzip data formats, and provides three compression levels: fast, default, and high compression ratio where the compression speed and ratio are in descending and ascending orders, respectively.

This package provides the streaming compression and decompression functions. That is, it can read data from the input stream, compress or decompress the data, and writ the data to the byte array, or it can read data from the byte array, compress or decompress the data, and write the data to the output stream.

Note:

This package does not support file packing.

API List

Class

NameDescription
CompressInputStreamCompresses an input stream.
CompressOutputStreamCompresses an output stream.
DecompressInputStreamDecompresses an input stream.
DecompressOutputStreamDecompresses an output stream.

Enumeration

NameDescription
CompressLevelSpecifies the compression level
WrapTypeSpecifies the compressed data format

Exception Class

NameDescription
ZlibExceptionSpecifies the exception class of the zlib package