This overview describes the example application that demonstrates the usage of the EZLIB API.
Click on the following link to download the example: EzlibExample.zip
Click: browse to view the example code.
EZLIB is a utility API used to compress and decompress data. The API is an extension of ZLIB compression library. For more information on ZLIB compression library, refer to RFC1950 .
This example application uses the EZLIB API to extract files from a .zip and a .gz file into specified folders, and to compress a .wav file into a .gz file. The application reads input files and stores the extracted files in c:\private\E80000B7\ .
After reading all the properties of each file in the archive, the application extracts all the files to the specified folder using the CZipFile::GetInputStreamL() method.
Other than extracting all the files in the archive, the application also searches for a specific file using the CZipFile::CaseInsensitiveMemberL() method and extracts it.
The application also opens the icon.bmp.gz file and extracts its contents to the specified location. The GZip file is represented by an object of the CEZGZipToFile class and its contents are extracted using the CEZGZipToFile::InflateL() method.
Finally, the application compresses the error.wav file to a .gz file. The GZip file being created is represented by an object of the CEZFileToGZip class and the .wav file is compressed using the CEZFileToGZip::DeflateL() method.
The Symbian build process describes how to build an application.
The EzlibExample builds an executable file called ezlibexample.exe in the standard location ( \epoc32\release\winscw\ < build_variant > for CodeWarrior). After launching the executable, depending on the emulator you are using, you may need to navigate using the application launcher or the eshell screen to view the console.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License v1.0.