1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xml:lang="en-US" lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
3  <head>
4    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5    <meta http-equiv="Content-Style-Type" content="text/css" />
6    <link rel="stylesheet" href="../../css/manpage.css" type="text/css" />
7    <title>CompressDeflate </title>
8  </head>
9  <body>
10    <h1><CODE><a href="../../nn/Overview.html">nn</a>::<a href="../../nn/cx/Overview.html">cx</a>::CompressDeflate</CODE> Function</h1>
11    <h2>Syntax</h2>
12    <div class="section">
13      <pre class="definition">#include &lt;nn/cx.h&gt;
14
15<a href="../../nn_types/s32.html">s32</a> CompressDeflate(
16     void * pDst,
17     size_t dstSize,
18     const void * pSrc,
19     size_t srcSize,
20     void * pWork
21);
22</pre>
23    </div>
24    <h2>Parameters</h2>
25    <div class="section">
26      <table class="arguments">
27        <thead>
28          <tr>
29            <td width="15" />
30            <th>Name</th>
31            <td>Description</td>
32          </tr>
33        </thead>
34        <tr>
35          <td>out</td>
36          <th><CODE>pDst</CODE> </th>
37          <td>Buffer where compressed data is written.</td>
38        </tr>
39        <tr>
40          <td>in</td>
41          <th><CODE>dstSize</CODE> </th>
42          <td>Size of the buffer pointed to by <SPAN class="argument">pDst</SPAN>.</td>
43        </tr>
44        <tr>
45          <td>in</td>
46          <th><CODE>pSrc</CODE> </th>
47          <td>Buffer storing the data to be compressed.</td>
48        </tr>
49        <tr>
50          <td>in</td>
51          <th><CODE>srcSize</CODE> </th>
52          <td>Size of the data to be compressed.</td>
53        </tr>
54        <tr>
55          <td>in</td>
56          <th><CODE>pWork</CODE> </th>
57          <td>Work buffer. It requires a region equal to <a href="../../nn/cx/DEFLATE_COMPRESS_WORK_SIZE.html"><CODE>DEFLATE_COMPRESS_WORK_SIZE</CODE></a> bytes.</td>
58        </tr> </table>
59    </div>
60    <h2>Return Values</h2>
61    <div class="section">When compression succeeds, returns the data size after compression. Returns an <a href="../../nn/cx/ErrorCode.html"><CODE>ErrorCode</CODE></a> value if unsuccessful. </div>
62    <h2>Description</h2>
63    <div class="section">
64      <p>Performs deflate compression appended to the <a href="../../nn/cx/Overview.html"><CODE>cx</CODE></a> common header.</p><p>You can use the <a href="../../nn/cx/GetCompressionType.html"><CODE>GetCompressionType</CODE></a> and <a href="../../nn/cx/GetUncompressedSize.html"><CODE>GetUncompressedSize</CODE></a> functions on data compressed with this function.</p><p>Data compressed with this function can be decompressed with the <a href="../../nn/cx/UncompressDeflate.html"><CODE>UncompressDeflate</CODE></a> function.</p><!-- write here --></div>
65    <h2>Revision History</h2>
66    <div class="section">
67      <dl class="history">
68        <dt>2012/05/17</dt>
69        <dd>Initial version. <br />
70        </dd>
71      </dl>
72    </div>
73  <hr><p>CONFIDENTIAL</p></body>
74</html>