Reading a ZIP file in Symbian OS C++ can be done via a class called CZipFile. It is declared in zipfile.h. The library name is ezip.lib.
The following example shows how to extract a specific file from a ZIP file.
// Create an instance of CZipFile.
CZipFile* zipFile = CZipFile::NewL(fileSession, aCompressedFile);
// Extract aFileName from the ZIP file.
CZipFileMember* member = zipFile->CaseInsensitiveMemberL(aFileName);
// Use input stream to extract the file.
// The input stream of a file inside ZIP file is RZipFileMemberReaderStream.
// The method used to get the input stream is CZipFile::GetInputStreamL().
// Read the file using input stream.
// Before reading the file, the code allocates a buffer to store with
// the size of member->UncompressesedSize().
// If the file is quite huge, do not use "one-shot" Read().
// Instead, read using a small block of buffer and do it inside an
// active object.
HBufC8* buffer = HBufC8::NewLC(member->UncompressedSize());
// Do whatever we want with the buffer.
// Finally, do not forget to release all the allocated resources.
CleanupStack::PopAndDestroy(4); // buffer, stream, member, zipFile