Debian Codegraph @

doc/api/classkyotocabinet_1_1ZLIB.html

raw
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 <meta http-equiv="X-UA-Compatible" content="IE=9"/>
6 <title>Kyoto Cabinet: kyotocabinet::ZLIB Class Reference</title>
7
8 <link href="tabs.css" rel="stylesheet" type="text/css"/>
9 <link href="doxygen.css" rel="stylesheet" type="text/css" />
10
11
12
13 </head>
14 <body>
15 <div id="top"><!-- do not remove this div! -->
16
17
18 <div id="titlearea">
19 <table cellspacing="0" cellpadding="0">
20 <tbody>
21 <tr style="height: 56px;">
22
23
24 <td style="padding-left: 0.5em;">
25 <div id="projectname">Kyoto Cabinet
26
27 </div>
28
29 </td>
30
31
32
33 </tr>
34 </tbody>
35 </table>
36 </div>
37
38 <!-- Generated by Doxygen 1.7.6.1 -->
39 <div id="navrow1" class="tabs">
40 <ul class="tablist">
41 <li><a href="index.html"><span>Main&#160;Page</span></a></li>
42 <li><a href="namespaces.html"><span>Namespaces</span></a></li>
43 <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
44 <li><a href="files.html"><span>Files</span></a></li>
45 </ul>
46 </div>
47 <div id="navrow2" class="tabs2">
48 <ul class="tablist">
49 <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
50 <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
51 <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
52 <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
53 </ul>
54 </div>
55 <div id="nav-path" class="navpath">
56 <ul>
57 <li class="navelem"><a class="el" href="namespacekyotocabinet.html">kyotocabinet</a> </li>
58 <li class="navelem"><a class="el" href="classkyotocabinet_1_1ZLIB.html">ZLIB</a> </li>
59 </ul>
60 </div>
61 </div>
62 <div class="header">
63 <div class="summary">
64 <a href="#pub-types">Public Types</a> &#124;
65 <a href="#pub-static-methods">Static Public Member Functions</a> </div>
66 <div class="headertitle">
67 <div class="title">kyotocabinet::ZLIB Class Reference</div> </div>
68 </div><!--header-->
69 <div class="contents">
70 <!-- doxytag: class="kyotocabinet::ZLIB" -->
71 <p><a class="el" href="classkyotocabinet_1_1ZLIB.html" title="ZLIB compressor.">ZLIB</a> compressor.
72 <a href="classkyotocabinet_1_1ZLIB.html#details">More...</a></p>
73
74 <p><code>#include &lt;kccompress.h&gt;</code></p>
75
76 <p><a href="classkyotocabinet_1_1ZLIB-members.html">List of all members.</a></p>
77 <table class="memberdecls">
78 <tr><td colspan="2"><h2><a name="pub-types"></a>
79 Public Types</h2></td></tr>
80 <tr><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1ZLIB.html#a0a0cc3f4a13c705f8f6754301a9b3b57">Mode</a> { <a class="el" href="classkyotocabinet_1_1ZLIB.html#a0a0cc3f4a13c705f8f6754301a9b3b57a465705260bc5a4ed21d869cac44a0e89">RAW</a>,
81 <a class="el" href="classkyotocabinet_1_1ZLIB.html#a0a0cc3f4a13c705f8f6754301a9b3b57a2dacfa98dd5b0382b9764cf56dc02948">DEFLATE</a>,
82 <a class="el" href="classkyotocabinet_1_1ZLIB.html#a0a0cc3f4a13c705f8f6754301a9b3b57aad0efc51650314cbb30150126d1c18e1">GZIP</a>
83 }</td></tr>
84 <tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Compression modes. <a href="classkyotocabinet_1_1ZLIB.html#a0a0cc3f4a13c705f8f6754301a9b3b57">More...</a><br/></td></tr>
85 <tr><td colspan="2"><h2><a name="pub-static-methods"></a>
86 Static Public Member Functions</h2></td></tr>
87 <tr><td class="memItemLeft" align="right" valign="top">static char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1ZLIB.html#a0f5ea3a5dbda5878659e7f730f41cd78">compress</a> (const void *buf, size_t size, size_t *sp, <a class="el" href="classkyotocabinet_1_1ZLIB.html#a0a0cc3f4a13c705f8f6754301a9b3b57">Mode</a> mode=<a class="el" href="classkyotocabinet_1_1ZLIB.html#a0a0cc3f4a13c705f8f6754301a9b3b57a465705260bc5a4ed21d869cac44a0e89">RAW</a>)</td></tr>
88 <tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Compress a serial data. <a href="#a0f5ea3a5dbda5878659e7f730f41cd78"></a><br/></td></tr>
89 <tr><td class="memItemLeft" align="right" valign="top">static char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1ZLIB.html#aa2b7b15c7098de775b08924b83832f48">decompress</a> (const void *buf, size_t size, size_t *sp, <a class="el" href="classkyotocabinet_1_1ZLIB.html#a0a0cc3f4a13c705f8f6754301a9b3b57">Mode</a> mode=<a class="el" href="classkyotocabinet_1_1ZLIB.html#a0a0cc3f4a13c705f8f6754301a9b3b57a465705260bc5a4ed21d869cac44a0e89">RAW</a>)</td></tr>
90 <tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Decompress a serial data. <a href="#aa2b7b15c7098de775b08924b83832f48"></a><br/></td></tr>
91 <tr><td class="memItemLeft" align="right" valign="top">static uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1ZLIB.html#ac6b10f76a3a2ac06a378042604425eca">calculate_crc</a> (const void *buf, size_t size, uint32_t seed=0)</td></tr>
92 <tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the CRC32 checksum of a serial data. <a href="#ac6b10f76a3a2ac06a378042604425eca"></a><br/></td></tr>
93 </table>
94 <hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
95 <div class="textblock"><p><a class="el" href="classkyotocabinet_1_1ZLIB.html" title="ZLIB compressor.">ZLIB</a> compressor. </p>
96 </div><hr/><h2>Member Enumeration Documentation</h2>
97 <a class="anchor" id="a0a0cc3f4a13c705f8f6754301a9b3b57"></a><!-- doxytag: member="kyotocabinet::ZLIB::Mode" ref="a0a0cc3f4a13c705f8f6754301a9b3b57" args="" -->
98 <div class="memitem">
99 <div class="memproto">
100 <table class="memname">
101 <tr>
102 <td class="memname">enum <a class="el" href="classkyotocabinet_1_1ZLIB.html#a0a0cc3f4a13c705f8f6754301a9b3b57">kyotocabinet::ZLIB::Mode</a></td>
103 </tr>
104 </table>
105 </div>
106 <div class="memdoc">
107
108 <p>Compression modes. </p>
109 <dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
110 <tr><td valign="top"><em><a class="anchor" id="a0a0cc3f4a13c705f8f6754301a9b3b57a465705260bc5a4ed21d869cac44a0e89"></a><!-- doxytag: member="RAW" ref="a0a0cc3f4a13c705f8f6754301a9b3b57a465705260bc5a4ed21d869cac44a0e89" args="" -->RAW</em>&nbsp;</td><td>
111 <p>without any checksum </p>
112 </td></tr>
113 <tr><td valign="top"><em><a class="anchor" id="a0a0cc3f4a13c705f8f6754301a9b3b57a2dacfa98dd5b0382b9764cf56dc02948"></a><!-- doxytag: member="DEFLATE" ref="a0a0cc3f4a13c705f8f6754301a9b3b57a2dacfa98dd5b0382b9764cf56dc02948" args="" -->DEFLATE</em>&nbsp;</td><td>
114 <p>with Adler32 checksum </p>
115 </td></tr>
116 <tr><td valign="top"><em><a class="anchor" id="a0a0cc3f4a13c705f8f6754301a9b3b57aad0efc51650314cbb30150126d1c18e1"></a><!-- doxytag: member="GZIP" ref="a0a0cc3f4a13c705f8f6754301a9b3b57aad0efc51650314cbb30150126d1c18e1" args="" -->GZIP</em>&nbsp;</td><td>
117 <p>with CRC32 checksum and various meta data </p>
118 </td></tr>
119 </table>
120 </dd>
121 </dl>
122
123 </div>
124 </div>
125 <hr/><h2>Member Function Documentation</h2>
126 <a class="anchor" id="a0f5ea3a5dbda5878659e7f730f41cd78"></a><!-- doxytag: member="kyotocabinet::ZLIB::compress" ref="a0f5ea3a5dbda5878659e7f730f41cd78" args="(const void *buf, size_t size, size_t *sp, Mode mode=RAW)" -->
127 <div class="memitem">
128 <div class="memproto">
129 <table class="memname">
130 <tr>
131 <td class="memname">static char* <a class="el" href="classkyotocabinet_1_1ZLIB.html#a0f5ea3a5dbda5878659e7f730f41cd78">kyotocabinet::ZLIB::compress</a> </td>
132 <td>(</td>
133 <td class="paramtype">const void *&#160;</td>
134 <td class="paramname"><em>buf</em>, </td>
135 </tr>
136 <tr>
137 <td class="paramkey"></td>
138 <td></td>
139 <td class="paramtype">size_t&#160;</td>
140 <td class="paramname"><em>size</em>, </td>
141 </tr>
142 <tr>
143 <td class="paramkey"></td>
144 <td></td>
145 <td class="paramtype">size_t *&#160;</td>
146 <td class="paramname"><em>sp</em>, </td>
147 </tr>
148 <tr>
149 <td class="paramkey"></td>
150 <td></td>
151 <td class="paramtype"><a class="el" href="classkyotocabinet_1_1ZLIB.html#a0a0cc3f4a13c705f8f6754301a9b3b57">Mode</a>&#160;</td>
152 <td class="paramname"><em>mode</em> = <code><a class="el" href="classkyotocabinet_1_1ZLIB.html#a0a0cc3f4a13c705f8f6754301a9b3b57a465705260bc5a4ed21d869cac44a0e89">RAW</a></code>&#160;</td>
153 </tr>
154 <tr>
155 <td></td>
156 <td>)</td>
157 <td></td><td><code> [static]</code></td>
158 </tr>
159 </table>
160 </div>
161 <div class="memdoc">
162
163 <p>Compress a serial data. </p>
164 <dl class="params"><dt><b>Parameters:</b></dt><dd>
165 <table class="params">
166 <tr><td class="paramname">buf</td><td>the input buffer. </td></tr>
167 <tr><td class="paramname">size</td><td>the size of the input buffer. </td></tr>
168 <tr><td class="paramname">sp</td><td>the pointer to the variable into which the size of the region of the return value is assigned. </td></tr>
169 <tr><td class="paramname">mode</td><td>the compression mode. </td></tr>
170 </table>
171 </dd>
172 </dl>
173 <dl class="return"><dt><b>Returns:</b></dt><dd>the pointer to the result data, or NULL on failure. </dd></dl>
174 <dl class="note"><dt><b>Note:</b></dt><dd>Because the region of the return value is allocated with the the new[] operator, it should be released with the delete[] operator when it is no longer in use. </dd></dl>
175
176 </div>
177 </div>
178 <a class="anchor" id="aa2b7b15c7098de775b08924b83832f48"></a><!-- doxytag: member="kyotocabinet::ZLIB::decompress" ref="aa2b7b15c7098de775b08924b83832f48" args="(const void *buf, size_t size, size_t *sp, Mode mode=RAW)" -->
179 <div class="memitem">
180 <div class="memproto">
181 <table class="memname">
182 <tr>
183 <td class="memname">static char* <a class="el" href="classkyotocabinet_1_1ZLIB.html#aa2b7b15c7098de775b08924b83832f48">kyotocabinet::ZLIB::decompress</a> </td>
184 <td>(</td>
185 <td class="paramtype">const void *&#160;</td>
186 <td class="paramname"><em>buf</em>, </td>
187 </tr>
188 <tr>
189 <td class="paramkey"></td>
190 <td></td>
191 <td class="paramtype">size_t&#160;</td>
192 <td class="paramname"><em>size</em>, </td>
193 </tr>
194 <tr>
195 <td class="paramkey"></td>
196 <td></td>
197 <td class="paramtype">size_t *&#160;</td>
198 <td class="paramname"><em>sp</em>, </td>
199 </tr>
200 <tr>
201 <td class="paramkey"></td>
202 <td></td>
203 <td class="paramtype"><a class="el" href="classkyotocabinet_1_1ZLIB.html#a0a0cc3f4a13c705f8f6754301a9b3b57">Mode</a>&#160;</td>
204 <td class="paramname"><em>mode</em> = <code><a class="el" href="classkyotocabinet_1_1ZLIB.html#a0a0cc3f4a13c705f8f6754301a9b3b57a465705260bc5a4ed21d869cac44a0e89">RAW</a></code>&#160;</td>
205 </tr>
206 <tr>
207 <td></td>
208 <td>)</td>
209 <td></td><td><code> [static]</code></td>
210 </tr>
211 </table>
212 </div>
213 <div class="memdoc">
214
215 <p>Decompress a serial data. </p>
216 <dl class="params"><dt><b>Parameters:</b></dt><dd>
217 <table class="params">
218 <tr><td class="paramname">buf</td><td>the input buffer. </td></tr>
219 <tr><td class="paramname">size</td><td>the size of the input buffer. </td></tr>
220 <tr><td class="paramname">sp</td><td>the pointer to the variable into which the size of the region of the return value is assigned. </td></tr>
221 <tr><td class="paramname">mode</td><td>the compression mode. </td></tr>
222 </table>
223 </dd>
224 </dl>
225 <dl class="return"><dt><b>Returns:</b></dt><dd>the pointer to the result data, or NULL on failure. </dd></dl>
226 <dl class="note"><dt><b>Note:</b></dt><dd>Because an additional zero code is appended at the end of the region of the return value, the return value can be treated as a C-style string. Because the region of the return value is allocated with the the new[] operator, it should be released with the delete[] operator when it is no longer in use. </dd></dl>
227
228 </div>
229 </div>
230 <a class="anchor" id="ac6b10f76a3a2ac06a378042604425eca"></a><!-- doxytag: member="kyotocabinet::ZLIB::calculate_crc" ref="ac6b10f76a3a2ac06a378042604425eca" args="(const void *buf, size_t size, uint32_t seed=0)" -->
231 <div class="memitem">
232 <div class="memproto">
233 <table class="memname">
234 <tr>
235 <td class="memname">static uint32_t <a class="el" href="classkyotocabinet_1_1ZLIB.html#ac6b10f76a3a2ac06a378042604425eca">kyotocabinet::ZLIB::calculate_crc</a> </td>
236 <td>(</td>
237 <td class="paramtype">const void *&#160;</td>
238 <td class="paramname"><em>buf</em>, </td>
239 </tr>
240 <tr>
241 <td class="paramkey"></td>
242 <td></td>
243 <td class="paramtype">size_t&#160;</td>
244 <td class="paramname"><em>size</em>, </td>
245 </tr>
246 <tr>
247 <td class="paramkey"></td>
248 <td></td>
249 <td class="paramtype">uint32_t&#160;</td>
250 <td class="paramname"><em>seed</em> = <code>0</code>&#160;</td>
251 </tr>
252 <tr>
253 <td></td>
254 <td>)</td>
255 <td></td><td><code> [static]</code></td>
256 </tr>
257 </table>
258 </div>
259 <div class="memdoc">
260
261 <p>Calculate the CRC32 checksum of a serial data. </p>
262 <dl class="params"><dt><b>Parameters:</b></dt><dd>
263 <table class="params">
264 <tr><td class="paramname">buf</td><td>the input buffer. </td></tr>
265 <tr><td class="paramname">size</td><td>the size of the input buffer. </td></tr>
266 <tr><td class="paramname">seed</td><td>the cyclic seed value. </td></tr>
267 </table>
268 </dd>
269 </dl>
270 <dl class="return"><dt><b>Returns:</b></dt><dd>the CRC32 checksum. </dd></dl>
271
272 </div>
273 </div>
274 </div><!-- contents -->
275
276
277 <hr class="footer"/><address class="footer"><small>
278 Generated on Fri May 25 2012 01:21:36 for Kyoto Cabinet by &#160;<a href="http://www.doxygen.org/index.html">
279 <img class="footer" src="doxygen.png" alt="doxygen"/>
280 </a> 1.7.6.1
281 </small></address>
282
283 </body>
284 </html>