The Zip Compression Library, EZLib, provides stream and file compression and decompression functionality for the Symbian platforms.
EZLib provides classes to handle the file, stream and buffer requirements of zlib. It provides native Symbian APIs that access the zlib compression algorithms and it exports some zlib and gzio C APIs from libz.dll. EZLib can operate on streams, flat zip files (zlib format) and gzip files.
EZLib facilitates:
You must be familiar with zlib, gzip compression and decompression formats and Deflate algorithms. You can find further information about each of these on the IETF (Internet Engineering Task Force) website.
zlib format is an open standard for lossless compressed data. It can be implemented using a number of alternative compression algorithms.
Data compression is a process of encoding information using fewer bits (or other information-bearing units) using specific encoding algorithms.
Decompression is the process of reconverting compressed data into its original (or nearly original) form.
A stream is an abstraction that represents a device on which input and ouput operations are performed. A stream can be considered as a source or destination of characters of indefinite length. A stream can be accessed only in sequence.
gzip is normally used to compress single files. Deflate is the compression algorithm used.
gzio APIs are input amd output functions for gzip format.
The zip file format is both data compression and archive. A zip file contains one or more files that have been compressed where possible to reduce file size. The zip file format permits a number of compression algorithms but only Deflate is widely used and supported.
The Zip Compression Library (EZLib) provides C++ wrapper classes that encapsulate the functionality of version 1.2.3 of the zlib library. zlib and gzio APIs are written in C. The core functionality is performed by a core library (libzcore.dll).
EZLib provides three DLLs which encapsulate the core functionality in Symbian C++ and Open Environment APIs.
LIBZ.DLL: This is an Open Environment library that provides the zlib and gzio C APIs. The APIs can be used to compress and decompress zlib and gzip file formats.
EZLIB.DLL: This provides Symbian C++ wrappers for the zlib compression and decompression APIs. It offers buffer, stream and gzip file handling classes. It also exports the C API interface provided by LIBZ.DLL with the exception of the gzio APIs. This library can be used to compress and decompress zlib and gzip file formats and memory streams.
EZIP.DLL: This provides Symbian C++ APIs for reading from and decompressing zip archives. It cannot be used to compress archives to zip archives.
The classes exported from ezlib.dll are tabulated below:
API | Description |
---|---|
Provides wrapper for ‘compress’ and ‘Deflate’ zlib APIs. |
|
Provides wrapper for ‘uncompress’ and ‘inflate’ zlib APIs. |
|
Provides basic file handling for CEZCompressor and CEZDecompressor classes. |
|
Provides implementation to compress an uncompressed file to a gzip file. |
|
Provides buffer management class for CEZFileToGZip. |
|
Provides implementation to uncompress a gzip file to an output file. |
|
Provides buffer management class for CEZGzipToFile. |
|
Provides stream handling. |
|
Pure virtual interface class. CEZFileBufferManager derives from this class. |
The classes exported from ezip.dll are tabulated below:
API | Description |
---|---|
Represents a zip archive and defines all relevant enumerations and structures. |
|
Represents a zip archive contained in a single file. |
|
Represents a compressed file contained in a CZipFile archive file. |
|
Allows iteration through all the entries of an archive. |
|
Represents an input stream for compressed files in an archive. |
libz.dll provides the C open environment and hybrid applications to support the zlib library.
The typical uses of the ZIP Compression Library are: