Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/openclibzheader_8h.html
changeset 6 43e37759235e
equal deleted inserted replaced
5:f345bda72bc4 6:43e37759235e
       
     1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
       
     2 <html xmlns="http://www.w3.org/1999/xhtml">
       
     3 <head>
       
     4 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
       
     5 <title>TB9.2 Example Applications: examples/PIPS/openclibz/inc/openclibzheader.h File Reference</title>
       
     6 <link href="tabs.css" rel="stylesheet" type="text/css"/>
       
     7 <link href="doxygen.css" rel="stylesheet" type="text/css"/>
       
     8 </head>
       
     9 <body>
       
    10 <!-- Generated by Doxygen 1.6.2 -->
       
    11 <div class="contents">
       
    12 <h1>examples/PIPS/openclibz/inc/openclibzheader.h File Reference</h1>
       
    13 <p><a href="openclibzheader_8h_source.html">Go to the source code of this file.</a></p>
       
    14 <table border="0" cellpadding="0" cellspacing="0">
       
    15 <tr><td colspan="2"><h2>Defines</h2></td></tr>
       
    16 <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af0358042fe986b270acfb8e365b2811e"></a><!-- doxytag: member="openclibzheader.h::GZ_SUFFIX" ref="af0358042fe986b270acfb8e365b2811e" args="" -->
       
    17 #define&nbsp;</td><td class="memItemRight" valign="bottom"><b>GZ_SUFFIX</b>&nbsp;&nbsp;&nbsp;&quot;.gz&quot;</td></tr>
       
    18 <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5a10308ce506a5645ae1e8b5e18dfded"></a><!-- doxytag: member="openclibzheader.h::SUFFIX_LEN" ref="a5a10308ce506a5645ae1e8b5e18dfded" args="" -->
       
    19 #define&nbsp;</td><td class="memItemRight" valign="bottom"><b>SUFFIX_LEN</b>&nbsp;&nbsp;&nbsp;(sizeof(GZ_SUFFIX)-1)</td></tr>
       
    20 <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad974fe981249f5e84fbf1683b012c9f8"></a><!-- doxytag: member="openclibzheader.h::BUFLEN" ref="ad974fe981249f5e84fbf1683b012c9f8" args="" -->
       
    21 #define&nbsp;</td><td class="memItemRight" valign="bottom"><b>BUFLEN</b>&nbsp;&nbsp;&nbsp;16384</td></tr>
       
    22 <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afd709f201d7643c3909621f620ea648a"></a><!-- doxytag: member="openclibzheader.h::MAX_NAME_LEN" ref="afd709f201d7643c3909621f620ea648a" args="" -->
       
    23 #define&nbsp;</td><td class="memItemRight" valign="bottom"><b>MAX_NAME_LEN</b>&nbsp;&nbsp;&nbsp;1024</td></tr>
       
    24 <tr><td colspan="2"><h2>Functions</h2></td></tr>
       
    25 <tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="openclibzheader_8h.html#ac31e38792dbbfc5e26d9dbccb33efe3d">StringCompress</a> ()</td></tr>
       
    26 <tr><td class="memItemLeft" align="right" valign="top">void Error&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="openclibzheader_8h.html#a31ef91dc889daf46c11b18576b77347c">OF</a> ((const char *msg))</td></tr>
       
    27 <tr><td class="memItemLeft" align="right" valign="top">void GzCompress&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="openclibzheader_8h.html#a3df66c06b3bc611be591987944cab8ff">OF</a> ((FILE *in, gzFile out))</td></tr>
       
    28 <tr><td class="memItemLeft" align="right" valign="top">void GzUnCompress&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="openclibzheader_8h.html#ac579673f62bd536288713fe045aa1350">OF</a> ((gzFile in, FILE *out))</td></tr>
       
    29 <tr><td class="memItemLeft" align="right" valign="top">void FileCompress&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="openclibzheader_8h.html#a4e879e61d2919fd75985cf9b06a566c6">OF</a> ((char *file, char *mode))</td></tr>
       
    30 <tr><td class="memItemLeft" align="right" valign="top">void FileUnCompress&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="openclibzheader_8h.html#abf7b4bee7cdd5520ba5587c635c9b2b2">OF</a> ((char *file))</td></tr>
       
    31 </table>
       
    32 <hr/><a name="_details"></a><h2>Detailed Description</h2>
       
    33 
       
    34 <p>Definition in file <a class="el" href="openclibzheader_8h_source.html">openclibzheader.h</a>.</p>
       
    35 <hr/><h2>Function Documentation</h2>
       
    36 <a class="anchor" id="ac31e38792dbbfc5e26d9dbccb33efe3d"></a><!-- doxytag: member="openclibzheader.h::StringCompress" ref="ac31e38792dbbfc5e26d9dbccb33efe3d" args="()" -->
       
    37 <div class="memitem">
       
    38 <div class="memproto">
       
    39       <table class="memname">
       
    40         <tr>
       
    41           <td class="memname">void StringCompress </td>
       
    42           <td>(</td>
       
    43           <td class="paramname"></td>
       
    44           <td>&nbsp;)&nbsp;</td>
       
    45           <td></td>
       
    46         </tr>
       
    47       </table>
       
    48 </div>
       
    49 <div class="memdoc">
       
    50 <p>Compresses the string This function compresses the string entered by the user and shows the compressed string and then decompressess it Actually This function will show the content on the screen and demonstarte how strings can be compressed </p>
       
    51 
       
    52 <p>Definition at line <a class="el" href="compress_8c_source.html#l00174">174</a> of file <a class="el" href="compress_8c_source.html">compress.c</a>.</p>
       
    53 
       
    54 </div>
       
    55 </div>
       
    56 <a class="anchor" id="a31ef91dc889daf46c11b18576b77347c"></a><!-- doxytag: member="openclibzheader.h::OF" ref="a31ef91dc889daf46c11b18576b77347c" args="((const char *msg))" -->
       
    57 <div class="memitem">
       
    58 <div class="memproto">
       
    59       <table class="memname">
       
    60         <tr>
       
    61           <td class="memname">void Error OF </td>
       
    62           <td>(</td>
       
    63           <td class="paramtype">(const char *msg)&nbsp;</td>
       
    64           <td class="paramname"></td>
       
    65           <td>&nbsp;)&nbsp;</td>
       
    66           <td></td>
       
    67         </tr>
       
    68       </table>
       
    69 </div>
       
    70 <div class="memdoc">
       
    71 <p>In case of any error display the error message</p>
       
    72 <dl><dt><b>Parameters:</b></dt><dd>
       
    73   <table border="0" cellspacing="2" cellpadding="0">
       
    74     <tr><td valign="top"></td><td valign="top"><em>msg</em>&nbsp;</td><td>will be displayed to the user</td></tr>
       
    75   </table>
       
    76   </dd>
       
    77 </dl>
       
    78 <dl class="return"><dt><b>Returns:</b></dt><dd>No return code ,application will terminate after displaying the error message. </dd></dl>
       
    79 
       
    80 </div>
       
    81 </div>
       
    82 <a class="anchor" id="a3df66c06b3bc611be591987944cab8ff"></a><!-- doxytag: member="openclibzheader.h::OF" ref="a3df66c06b3bc611be591987944cab8ff" args="((FILE *in, gzFile out))" -->
       
    83 <div class="memitem">
       
    84 <div class="memproto">
       
    85       <table class="memname">
       
    86         <tr>
       
    87           <td class="memname">void GzCompress OF </td>
       
    88           <td>(</td>
       
    89           <td class="paramtype">(FILE *in, gzFile out)&nbsp;</td>
       
    90           <td class="paramname"></td>
       
    91           <td>&nbsp;)&nbsp;</td>
       
    92           <td></td>
       
    93         </tr>
       
    94       </table>
       
    95 </div>
       
    96 <div class="memdoc">
       
    97 <p>Compresses the input file First tries to compress using GzCompressMmap ,But if it fails it tries normal technique</p>
       
    98 <dl><dt><b>Parameters:</b></dt><dd>
       
    99   <table border="0" cellspacing="2" cellpadding="0">
       
   100     <tr><td valign="top"></td><td valign="top"><em>in</em>&nbsp;</td><td>is the name of input file . </td></tr>
       
   101     <tr><td valign="top"></td><td valign="top"><em>out</em>&nbsp;</td><td>is the name of output file. </td></tr>
       
   102   </table>
       
   103   </dd>
       
   104 </dl>
       
   105 <dl class="return"><dt><b>Returns:</b></dt><dd>a Symbian OS error code. </dd></dl>
       
   106 
       
   107 </div>
       
   108 </div>
       
   109 <a class="anchor" id="ac579673f62bd536288713fe045aa1350"></a><!-- doxytag: member="openclibzheader.h::OF" ref="ac579673f62bd536288713fe045aa1350" args="((gzFile in, FILE *out))" -->
       
   110 <div class="memitem">
       
   111 <div class="memproto">
       
   112       <table class="memname">
       
   113         <tr>
       
   114           <td class="memname">void GzUnCompress OF </td>
       
   115           <td>(</td>
       
   116           <td class="paramtype">(gzFile in, FILE *out)&nbsp;</td>
       
   117           <td class="paramname"></td>
       
   118           <td>&nbsp;)&nbsp;</td>
       
   119           <td></td>
       
   120         </tr>
       
   121       </table>
       
   122 </div>
       
   123 <div class="memdoc">
       
   124 <p>GzCompressMmap function compresses the file using mmap technique Compression can be done in a single step using mmap but it requires enough large buffers. I have implemented my code such that, EvenIn case of mmap failure (because of shortage of buffer space) It compresses using normal technique.</p>
       
   125 <dl><dt><b>Parameters:</b></dt><dd>
       
   126   <table border="0" cellspacing="2" cellpadding="0">
       
   127     <tr><td valign="top"></td><td valign="top"><em>in</em>&nbsp;</td><td>the name of input file. </td></tr>
       
   128     <tr><td valign="top"></td><td valign="top"><em>out</em>&nbsp;</td><td>is the name of output file. UnCompresses the file using libz api's</td></tr>
       
   129     <tr><td valign="top"></td><td valign="top"><em>in</em>&nbsp;</td><td>is the name of input file . </td></tr>
       
   130     <tr><td valign="top"></td><td valign="top"><em>out</em>&nbsp;</td><td>is the name of output file. </td></tr>
       
   131   </table>
       
   132   </dd>
       
   133 </dl>
       
   134 
       
   135 </div>
       
   136 </div>
       
   137 <a class="anchor" id="a4e879e61d2919fd75985cf9b06a566c6"></a><!-- doxytag: member="openclibzheader.h::OF" ref="a4e879e61d2919fd75985cf9b06a566c6" args="((char *file, char *mode))" -->
       
   138 <div class="memitem">
       
   139 <div class="memproto">
       
   140       <table class="memname">
       
   141         <tr>
       
   142           <td class="memname">void FileCompress OF </td>
       
   143           <td>(</td>
       
   144           <td class="paramtype">(char *file, char *mode)&nbsp;</td>
       
   145           <td class="paramname"></td>
       
   146           <td>&nbsp;)&nbsp;</td>
       
   147           <td></td>
       
   148         </tr>
       
   149       </table>
       
   150 </div>
       
   151 <div class="memdoc">
       
   152 <p>Compresses the File It creates the output filename . It checkes for the existence of input file. And then it calls GzCompress .</p>
       
   153 <dl><dt><b>Parameters:</b></dt><dd>
       
   154   <table border="0" cellspacing="2" cellpadding="0">
       
   155     <tr><td valign="top"></td><td valign="top"><em>file</em>&nbsp;</td><td>is the name of the file to be compressed </td></tr>
       
   156     <tr><td valign="top"></td><td valign="top"><em>mode</em>&nbsp;</td><td>is for the technique used for opening the file. </td></tr>
       
   157   </table>
       
   158   </dd>
       
   159 </dl>
       
   160 
       
   161 </div>
       
   162 </div>
       
   163 <a class="anchor" id="abf7b4bee7cdd5520ba5587c635c9b2b2"></a><!-- doxytag: member="openclibzheader.h::OF" ref="abf7b4bee7cdd5520ba5587c635c9b2b2" args="((char *file))" -->
       
   164 <div class="memitem">
       
   165 <div class="memproto">
       
   166       <table class="memname">
       
   167         <tr>
       
   168           <td class="memname">void FileUnCompress OF </td>
       
   169           <td>(</td>
       
   170           <td class="paramtype">(char *file)&nbsp;</td>
       
   171           <td class="paramname"></td>
       
   172           <td>&nbsp;)&nbsp;</td>
       
   173           <td></td>
       
   174         </tr>
       
   175       </table>
       
   176 </div>
       
   177 <div class="memdoc">
       
   178 <p>It generates the output filename . It checks for the existence of the file and then calls GzUnCompress.</p>
       
   179 <dl><dt><b>Parameters:</b></dt><dd>
       
   180   <table border="0" cellspacing="2" cellpadding="0">
       
   181     <tr><td valign="top"></td><td valign="top"><em>file</em>&nbsp;</td><td>is the name of the compressed (.gz) file . </td></tr>
       
   182   </table>
       
   183   </dd>
       
   184 </dl>
       
   185 
       
   186 </div>
       
   187 </div>
       
   188 </div>
       
   189 <hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
       
   190 <a href="http://www.doxygen.org/index.html">
       
   191 <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
       
   192 </body>
       
   193 </html>