Symbian3/SDK/Source/GUID-4BEFF7BA-2A39-5601-919E-22AF08D06023.dita
changeset 7 51a74ef9ed63
child 8 ae94777fff8f
equal deleted inserted replaced
6:43e37759235e 7:51a74ef9ed63
       
     1 <?xml version="1.0" encoding="utf-8"?>
       
     2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
       
     3 <!-- This component and the accompanying materials are made available under the terms of the License 
       
     4 "Eclipse Public License v1.0" which accompanies this distribution, 
       
     5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
       
     6 <!-- Initial Contributors:
       
     7     Nokia Corporation - initial contribution.
       
     8 Contributors: 
       
     9 -->
       
    10 <!DOCTYPE concept
       
    11   PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
       
    12 <concept id="GUID-4BEFF7BA-2A39-5601-919E-22AF08D06023" xml:lang="en"><title>Zip
       
    13 Compression Library Overview</title><shortdesc>The Zip Compression Library, EZLib, provides stream and file compression
       
    14 and decompression functionality for the Symbian platforms. </shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
       
    15 <p>EZLib provides classes to handle the file, stream and buffer requirements
       
    16 of zlib. It provides native Symbian APIs that access the zlib compression
       
    17 algorithms and it exports some zlib and gzio C APIs from libz.dll. EZLib can
       
    18 operate on streams, flat zip files (zlib format) and gzip files. </p>
       
    19 <section><title>Purpose</title> <p>EZLib facilitates: </p> <ul>
       
    20 <li id="GUID-EB810152-39F6-5B42-B9CA-092FD2DBADB5"><p>Compression and decompression
       
    21 of memory streams </p> </li>
       
    22 <li id="GUID-F1E8AD72-1E1C-5978-BBDB-FCF529238441"><p>Compression and decompression
       
    23 of files </p> </li>
       
    24 <li id="GUID-B08AB8E2-DE37-59B2-86D3-04F5385BFCE0"><p>Decompression of file
       
    25 archives of gzip format </p> </li>
       
    26 </ul> </section>
       
    27 <section><title>Required background</title> <p>You must be familiar with zlib,
       
    28 gzip compression and decompression formats and Deflate algorithms. You can
       
    29 find further information about each of these on the IETF (Internet Engineering
       
    30 Task Force) website. </p> <p> <xref href="http://www.ietf.org/rfc/rfc1950.txt" scope="external">RFC1950- zlib format</xref>  </p> <p> <xref href="http://www.ietf.org/rfc/rfc1951.txt" scope="external">RFC1951-Deflate algorithm</xref>  </p> <p> <xref href="http://www.ietf.org/rfc/rfc1952.txt" scope="external">RFC1952-gzip format</xref>  </p> </section>
       
    31 <section><title>Key concepts and terms</title> <dl>
       
    32 <dlentry>
       
    33 <dt>zlib</dt>
       
    34 <dd><p>zlib format is an open standard for lossless compressed data. It can
       
    35 be implemented using a number of alternative compression algorithms. </p> </dd>
       
    36 </dlentry>
       
    37 <dlentry>
       
    38 <dt>Compression</dt>
       
    39 <dd><p>Data compression is a process of encoding information using fewer bits
       
    40 (or other information-bearing units) using specific encoding algorithms. </p> </dd>
       
    41 </dlentry>
       
    42 <dlentry>
       
    43 <dt>Decompression</dt>
       
    44 <dd><p>Decompression is the process of reconverting compressed data into its
       
    45 original (or nearly original) form. </p> </dd>
       
    46 </dlentry>
       
    47 <dlentry>
       
    48 <dt>Stream</dt>
       
    49 <dd><p>A stream is an abstraction that represents a device on which input
       
    50 and ouput operations are performed. A stream can be considered as a source
       
    51 or destination of characters of indefinite length. A stream can be accessed
       
    52 only in sequence. </p> </dd>
       
    53 </dlentry>
       
    54 <dlentry>
       
    55 <dt>gzip File Format</dt>
       
    56 <dd><p>gzip is normally used to compress single files. Deflate is the compression
       
    57 algorithm used. </p> </dd>
       
    58 </dlentry>
       
    59 <dlentry>
       
    60 <dt>gzio</dt>
       
    61 <dd><p>gzio APIs are input amd output functions for gzip format. </p> </dd>
       
    62 </dlentry>
       
    63 <dlentry>
       
    64 <dt>zip Format</dt>
       
    65 <dd><p>The zip file format is both data compression and archive. A zip file
       
    66 contains one or more files that have been compressed where possible to reduce
       
    67 file size. The zip file format permits a number of compression algorithms
       
    68 but only Deflate is widely used and supported. </p> </dd>
       
    69 </dlentry>
       
    70 </dl> </section>
       
    71 <section><title>Architecture</title> <p>The Zip Compression Library (EZLib)
       
    72 provides C++ wrapper classes that encapsulate the functionality of version
       
    73 1.2.3 of the zlib library. zlib and gzio APIs are written in C. The core functionality
       
    74 is performed by a core library (libzcore.dll). </p> <p>EZLib provides three
       
    75 DLLs which encapsulate the core functionality in Symbian C++ and Open Environment
       
    76 APIs. </p> <ul>
       
    77 <li id="GUID-D8A474AF-8853-5297-AF1A-CDB87AA90CDC"><p>LIBZ.DLL: This is an
       
    78 Open Environment library that provides the zlib and gzio C APIs. The APIs
       
    79 can be used to compress and decompress zlib and gzip file formats. </p> </li>
       
    80 <li id="GUID-11302514-AFA7-548A-8EB2-2CD0FE34B1B5"><p>EZLIB.DLL: This provides
       
    81 Symbian C++ wrappers for the zlib compression and decompression APIs. It offers
       
    82 buffer, stream and gzip file handling classes. It also exports the C API interface
       
    83 provided by LIBZ.DLL with the exception of the gzio APIs. This library can
       
    84 be used to compress and decompress zlib and gzip file formats and memory streams. </p> </li>
       
    85 <li id="GUID-123ED28B-2F59-593E-B1F4-DA1E70368A0C"><p>EZIP.DLL: This provides
       
    86 Symbian C++ APIs for reading from and decompressing zip archives. It cannot
       
    87 be used to compress archives to zip archives. </p> </li>
       
    88 </ul> <fig id="GUID-14EAABD4-6E9D-53CA-9515-7504EF0482D7">
       
    89 <title>              EZLib Architecture            </title>
       
    90 <image href="GUID-917790B7-A71D-511C-AFAB-BB46EFD046C6_d0e151178_href.jpg" placement="inline"/>
       
    91 </fig> </section>
       
    92 <section><title>APIs</title> <p>The classes exported from <filepath>ezlib.dll</filepath> are
       
    93 tabulated below: </p> <table id="GUID-DD3CE37A-8241-5961-B517-03266AE463F0">
       
    94 <tgroup cols="2"><colspec colname="col0"/><colspec colname="col1"/>
       
    95 <thead>
       
    96 <row>
       
    97 <entry>API</entry>
       
    98 <entry>Description</entry>
       
    99 </row>
       
   100 </thead>
       
   101 <tbody>
       
   102 <row>
       
   103 <entry><p> <xref href="GUID-AEF8BCC8-6B24-3D59-AD3A-17B5203B3AA5.dita"><apiname>CEZCompressor</apiname></xref>  </p> </entry>
       
   104 <entry><p>Provides wrapper for ‘compress’ and ‘Deflate’ zlib APIs. </p> </entry>
       
   105 </row>
       
   106 <row>
       
   107 <entry><p> <xref href="GUID-BC3CEC02-B747-38FB-8B35-E7390DB06E35.dita"><apiname>CEZDecompressor</apiname></xref>  </p> </entry>
       
   108 <entry><p>Provides wrapper for ‘uncompress’ and ‘inflate’ zlib APIs. </p> </entry>
       
   109 </row>
       
   110 <row>
       
   111 <entry><p> <xref href="GUID-A54D8675-1874-3B4F-816D-001A235C0F9C.dita"><apiname>CEZFileBufferManager</apiname></xref>  </p> </entry>
       
   112 <entry><p>Provides basic file handling for CEZCompressor and CEZDecompressor
       
   113 classes. </p> </entry>
       
   114 </row>
       
   115 <row>
       
   116 <entry><p> <xref href="GUID-417AB4E0-FF07-34CB-A4A8-CEF31C48A162.dita"><apiname>CEZFileToGZip</apiname></xref>  </p> </entry>
       
   117 <entry><p>Provides implementation to compress an uncompressed file to a gzip
       
   118 file. </p> </entry>
       
   119 </row>
       
   120 <row>
       
   121 <entry><p> <xref href="GUID-20B207AF-0DEB-3B4A-8BA4-4C0D17F544AC.dita"><apiname>CEZFileToGzipBM</apiname></xref>  </p> </entry>
       
   122 <entry><p>Provides buffer management class for CEZFileToGZip. </p> </entry>
       
   123 </row>
       
   124 <row>
       
   125 <entry><p> <xref href="GUID-8DE05785-D058-3855-A11F-7132EB4DE078.dita"><apiname>CEZGZipToFile</apiname></xref>  </p> </entry>
       
   126 <entry><p>Provides implementation to uncompress a gzip file to an output file. </p> </entry>
       
   127 </row>
       
   128 <row>
       
   129 <entry><p> <xref href="GUID-2C372219-941A-3D1B-885F-8BC745827445.dita"><apiname>CEZGzipToFileBM</apiname></xref>  </p> </entry>
       
   130 <entry><p>Provides buffer management class for CEZGzipToFile. </p> </entry>
       
   131 </row>
       
   132 <row>
       
   133 <entry><p> <xref href="GUID-E9A5CC9F-612E-3C32-AF93-6F28D2A894EF.dita"><apiname>CEZZStream</apiname></xref>  </p> </entry>
       
   134 <entry><p>Provides stream handling. </p> </entry>
       
   135 </row>
       
   136 <row>
       
   137 <entry><p> <xref href="GUID-B90BA6D6-72A2-3EB8-B8EF-CD5408107A9E.dita"><apiname>MEZBufferManager</apiname></xref>  </p> </entry>
       
   138 <entry><p>Pure virtual interface class. CEZFileBufferManager derives from
       
   139 this class. </p> </entry>
       
   140 </row>
       
   141 </tbody>
       
   142 </tgroup>
       
   143 </table> <p>The classes exported from <filepath>ezip.dll</filepath> are tabulated
       
   144 below: </p> <table id="GUID-067977A4-93E7-5E09-9962-63B3FA501B42">
       
   145 <tgroup cols="2"><colspec colname="col0"/><colspec colname="col1"/>
       
   146 <thead>
       
   147 <row>
       
   148 <entry>API</entry>
       
   149 <entry>Description</entry>
       
   150 </row>
       
   151 </thead>
       
   152 <tbody>
       
   153 <row>
       
   154 <entry><p> <xref href="GUID-8C8DEC50-6FC8-3DED-84E1-1EA42E2A0BB8.dita"><apiname>CZipArchive</apiname></xref>  </p> </entry>
       
   155 <entry><p>Represents a zip archive and defines all relevant enumerations and
       
   156 structures. </p> </entry>
       
   157 </row>
       
   158 <row>
       
   159 <entry><p> <xref href="GUID-79C613E8-35F8-319B-BE8B-1411CBE5AF00.dita"><apiname>CZipFile</apiname></xref>  </p> </entry>
       
   160 <entry><p>Represents a zip archive contained in a single file. </p> </entry>
       
   161 </row>
       
   162 <row>
       
   163 <entry><p> <xref href="GUID-02A8BC62-D653-39A3-BE0C-92A5F3F43E85.dita"><apiname>CZipFileMember</apiname></xref>  </p> </entry>
       
   164 <entry><p>Represents a compressed file contained in a CZipFile archive file. </p> </entry>
       
   165 </row>
       
   166 <row>
       
   167 <entry><p> <xref href="GUID-D458AE6A-EC64-3882-BCEA-A44A43DAA99A.dita"><apiname>CZipFileMemberIterator</apiname></xref>  </p> </entry>
       
   168 <entry><p>Allows iteration through all the entries of an archive. </p> </entry>
       
   169 </row>
       
   170 <row>
       
   171 <entry><p> <xref href="GUID-62F9728B-9C39-3496-BAEB-6E1456E6F197.dita"><apiname>RZipFileMemberReaderStream</apiname></xref>  </p> </entry>
       
   172 <entry><p>Represents an input stream for compressed files in an archive. </p> </entry>
       
   173 </row>
       
   174 </tbody>
       
   175 </tgroup>
       
   176 </table> <p><filepath>libz.dll</filepath> provides the C open environment
       
   177 and hybrid applications to support the zlib library. </p></section>
       
   178 <section><title>Typical uses</title> <p>The typical uses of
       
   179 the ZIP Compression Library are: </p> <ul>
       
   180 <li id="GUID-374EF76C-333C-5A09-9154-42056C70DD58"><p><xref href="GUID-548CC331-8E38-5627-A925-EA386BE90258.dita"> Compression
       
   181 and decompression of files(gzip)</xref>  </p> </li>
       
   182 <li id="GUID-053B2446-7ED5-5263-AF3D-00866C829B4C"><p><xref href="GUID-84922B27-FDCF-56FD-91ED-5E0BFE3ED0E4.dita">Compression
       
   183 and decompression of files(zip) </xref>  </p> </li>
       
   184 <li id="GUID-BA9F0FBB-6B0C-51DB-8162-336C27002B79"><p><xref href="GUID-C3086910-D7B4-5549-BF65-374C8B602E8F.dita"> Compression
       
   185 and decompression of memory streams </xref>  </p> </li>
       
   186 <li id="GUID-A6DDC9BD-B8F4-52CE-BE3D-AFAC549EF9ED"><p><xref href="GUID-FDDAF8E9-4CAB-5489-B578-A5362E2140C1.dita"> Decompression
       
   187 of file archives </xref>  </p> </li>
       
   188 </ul> </section>
       
   189 </conbody></concept>