Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 2ff8806b45ba9c96e77e01e6d40e440b > files > 157

libsc68_2.2.1-devel-2.2.1-11mdv2010.0.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>sc68fordevelopers: ICE 2.4 depacker library.</title>
<link href="tabs.css" rel="stylesheet" type="text/css">
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.9 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>ICE 2.4 depacker library.</h1>ICE 2.4 depacker.  
<a href="#_details">More...</a>
<p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Files</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">file &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="unice68_8h.html">unice68.h</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">ICE depacker. <br></td></tr>

<p>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__unice68__devel.html#gedd83586a362e1aeeca21d771abf640e">unice68_ice_version</a> (void)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get ICE depacker version.  <a href="#gedd83586a362e1aeeca21d771abf640e"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__unice68__devel.html#gf8724caf31f040238b8ef7de4b98ae70">unice68_get_depacked_size</a> (const void *buffer, int *p_csize)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Test ICE and get compressed and uncompresed size.  <a href="#gf8724caf31f040238b8ef7de4b98ae70"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__unice68__devel.html#ga8e78b2e9c749cb854ce03e379dcadf9">unice68_depacker</a> (void *dest, const void *src)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Depack an ICE buffer to another.  <a href="#ga8e78b2e9c749cb854ce03e379dcadf9"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
ICE 2.4 depacker. 
<p>
<dl class="author" compact><dt><b>Author:</b></dt><dd>Benjamin Gerard &lt;<a href="mailto:ben@sashipa.com">ben@sashipa.com</a>&gt; </dd></dl>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="gedd83586a362e1aeeca21d771abf640e"></a><!-- doxytag: member="unice68.h::unice68_ice_version" ref="gedd83586a362e1aeeca21d771abf640e" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int unice68_ice_version           </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get ICE depacker version. 
<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>version number (MAJOR*100+MINOR) </dd></dl>

</div>
</div><p>
<a class="anchor" name="gf8724caf31f040238b8ef7de4b98ae70"></a><!-- doxytag: member="unice68.h::unice68_get_depacked_size" ref="gf8724caf31f040238b8ef7de4b98ae70" args="(const void *buffer, int *p_csize)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int unice68_get_depacked_size           </td>
          <td>(</td>
          <td class="paramtype">const void *&nbsp;</td>
          <td class="paramname"> <em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&nbsp;</td>
          <td class="paramname"> <em>p_csize</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Test ICE and get compressed and uncompresed size. 
<p>
The <a class="el" href="group__unice68__devel.html#gf8724caf31f040238b8ef7de4b98ae70" title="Test ICE and get compressed and uncompresed size.">unice68_get_depacked_size()</a> function returns the uncompressed size of a ICE compressed buffer. If p_size is not 0 it is fill with the size of the compressed data found in header (useful for stream operation). If the value pointed by p_csize is not 0 the function assumes that it is an expected compressed size and compares it to header one. If it differs the function returns the bitwise NOT value of uncompressed data. This should be a minus value but not -1.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>buffer</em>&nbsp;</td><td>buffer with at least 12 bytes of data (ice header). </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>p_csize</em>&nbsp;</td><td>Optionnal pointer to store compressed size. May be use to verify an expected compressed size. See function documentation for more details.</td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>uncompressed size </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>&gt;0</em>&nbsp;</td><td>Uncompressed size </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>-1</em>&nbsp;</td><td>Error, not a valid ICE packed buffer </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>&lt;0</em>&nbsp;</td><td>Bitwise NOT of uncompressed size but verify failed. </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="ga8e78b2e9c749cb854ce03e379dcadf9"></a><!-- doxytag: member="unice68.h::unice68_depacker" ref="ga8e78b2e9c749cb854ce03e379dcadf9" args="(void *dest, const void *src)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int unice68_depacker           </td>
          <td>(</td>
          <td class="paramtype">void *&nbsp;</td>
          <td class="paramname"> <em>dest</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void *&nbsp;</td>
          <td class="paramname"> <em>src</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Depack an ICE buffer to another. 
<p>
The <a class="el" href="group__unice68__devel.html#ga8e78b2e9c749cb854ce03e379dcadf9" title="Depack an ICE buffer to another.">unice68_depacker()</a> depack src ICE compressed buffer to dest. The dest buffer is assumed to be already allocated with enought room.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>dest</em>&nbsp;</td><td>destination buffer (uncompressed data). </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>src</em>&nbsp;</td><td>source buffer (compressed data).</td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>error code </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>0</em>&nbsp;</td><td>succcess </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>1</em>&nbsp;</td><td>failure</td></tr>
  </table>
</dl>
<dl class="warning" compact><dt><b>Warning:</b></dt><dd>The original ICE depacker may allow to use the same buffer for compressed and uncompressed data. Anyway this has not been tested and you are encouraged to add guard bands. </dd></dl>

</div>
</div><p>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Tue Sep 15 03:58:05 2009 for sc68fordevelopers by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.9 </small></address>
</body>
</html>