EZLib Interface

The Symbian platform implements compression and decompression with the open source ZLib library, which uses dynamic Huffman encoding and LZ77 compression.

The user needs to know about the below:

About EZLib interfaces

The EZLib interfaces accomodates the following libraries:

  • ZLib : It is the original open source code, written in C and slightly modified to run on the Symbian platform.

  • EZLib : It consists of a direct interface to the original C API and a C++ wrapper round that same API.

    Earlier versions of EZLib are still supported by the Symbian platform but are deprecated for new development. The current implementation is backwards compatible with previous ones.

EZLib consists of the following dlls:

  • libz.dll, a set of C APIs with the functionality of ZLib version 1.2.3.

  • ezlib.dll, a set of C++ APIs with the same functionality as the C APIs, packaged to offer different variations of the functionality.

  • ezip.dll, a set of C++ APIs with the same functionality as the C APIs, packaged to offer different variations of the functionality.

How to select an EZLib interface

DLLs are used to implement the EZLib interface features.

Symbian Developers must therefore decide about the interfaces (C or C++) and DLLs to be used.

  • If you want to read from a zip archive you must use C++ and include ezip.dll because this functionality is specific to the Symbian platform and is not part of the open source ZLib library.

  • If you are writing client applications to run purely on the Symbian platform you must use C++.

  • If you are integrating an existing application which already interfaces to the open source version of zlib you must choose C.

  • If you are writing a cross-platform application to run on various platforms including the Symbian platform you should probably choose C.

  • If you simply want the compression and decompression functionality without file input and output you should include ezlib.dll. This DLL excludes the API functions with names beginning in gz such as gzread() and gzwrite() supplying the I/O functionality known as gzio. The Symbian platform which previously used EZlib does not use gzio and you should chooose ezlib.dll when working with it.

  • If you want gzio input and output functionality you should choose libz.dll. However, use of this DLL entails memory and performance overheads so you should only use it if you definitely need the additional functionality.

The appropriate header file must be included in the application to implement your choice of DLL.