The Zip Compression Library, EZLib provides stream compression and decompression functionality for the Symbian platforms. This tutorial summarizes the procedure involved in the compression and decompression of memory streams by EZLib.
The functions used for memory stream compression and decompression are provided by the CEZCompressor class.
The compression can be executed in single or multiple steps. This is depenedent on the buffer size of the memory stream. Small buffers are compressed in a single step. Larger buffers are compressed in small chunks repeatedly till the entire buffer is compressed. Clients must respond to callbacks from the library to provide information and resources required to complete the task.
To decompress the memory streams:
Define a buffer manager that implements MEZBufferManager.
Create an instance of the classs CEZDecompressor.
Invoke CEZDecompressor::DecompressL() for small buffers.
Invoke CEZDecompressor::InflateL() repeatedly on larger buffers until the entire buffer is compressed.