<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <title>Kyoto Cabinet: kyotocabinet::LZO Class Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="doxygen.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">Kyoto Cabinet </div> </td> </tr> </tbody> </table> </div> <!-- Generated by Doxygen 1.7.6.1 --> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li class="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="classes.html"><span>Class Index</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="namespacekyotocabinet.html">kyotocabinet</a> </li> <li class="navelem"><a class="el" href="classkyotocabinet_1_1LZO.html">LZO</a> </li> </ul> </div> </div> <div class="header"> <div class="summary"> <a href="#pub-types">Public Types</a> | <a href="#pub-static-methods">Static Public Member Functions</a> </div> <div class="headertitle"> <div class="title">kyotocabinet::LZO Class Reference</div> </div> </div><!--header--> <div class="contents"> <!-- doxytag: class="kyotocabinet::LZO" --> <p><a class="el" href="classkyotocabinet_1_1LZO.html" title="LZO compressor.">LZO</a> compressor. <a href="classkyotocabinet_1_1LZO.html#details">More...</a></p> <p><code>#include <kccompress.h></code></p> <p><a href="classkyotocabinet_1_1LZO-members.html">List of all members.</a></p> <table class="memberdecls"> <tr><td colspan="2"><h2><a name="pub-types"></a> Public Types</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1LZO.html#aa071fed0e142357ee0ccbf11d8c10e30">Mode</a> { <a class="el" href="classkyotocabinet_1_1LZO.html#aa071fed0e142357ee0ccbf11d8c10e30ac34dadab072289a3d840127953e50b2a">RAW</a>, <a class="el" href="classkyotocabinet_1_1LZO.html#aa071fed0e142357ee0ccbf11d8c10e30acec1fa2fd69048d1db9e706ebd0a1195">CRC</a> }</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Compression modes. <a href="classkyotocabinet_1_1LZO.html#aa071fed0e142357ee0ccbf11d8c10e30">More...</a><br/></td></tr> <tr><td colspan="2"><h2><a name="pub-static-methods"></a> Static Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">static char * </td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1LZO.html#a4cae07a2022b55b0426bcb9629a19e7e">compress</a> (const void *buf, size_t size, size_t *sp, <a class="el" href="classkyotocabinet_1_1LZO.html#aa071fed0e142357ee0ccbf11d8c10e30">Mode</a> mode=<a class="el" href="classkyotocabinet_1_1LZO.html#aa071fed0e142357ee0ccbf11d8c10e30ac34dadab072289a3d840127953e50b2a">RAW</a>)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Compress a serial data. <a href="#a4cae07a2022b55b0426bcb9629a19e7e"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">static char * </td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1LZO.html#a2164fb0f0f36d5029eb9d53ccf8c8652">decompress</a> (const void *buf, size_t size, size_t *sp, <a class="el" href="classkyotocabinet_1_1LZO.html#aa071fed0e142357ee0ccbf11d8c10e30">Mode</a> mode=<a class="el" href="classkyotocabinet_1_1LZO.html#aa071fed0e142357ee0ccbf11d8c10e30ac34dadab072289a3d840127953e50b2a">RAW</a>)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Decompress a serial data. <a href="#a2164fb0f0f36d5029eb9d53ccf8c8652"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">static uint32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classkyotocabinet_1_1LZO.html#aa18945773d9ed6722ade4f336ed6b8b5">calculate_crc</a> (const void *buf, size_t size, uint32_t seed=0)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Calculate the CRC32 checksum of a serial data. <a href="#aa18945773d9ed6722ade4f336ed6b8b5"></a><br/></td></tr> </table> <hr/><a name="details" id="details"></a><h2>Detailed Description</h2> <div class="textblock"><p><a class="el" href="classkyotocabinet_1_1LZO.html" title="LZO compressor.">LZO</a> compressor. </p> </div><hr/><h2>Member Enumeration Documentation</h2> <a class="anchor" id="aa071fed0e142357ee0ccbf11d8c10e30"></a><!-- doxytag: member="kyotocabinet::LZO::Mode" ref="aa071fed0e142357ee0ccbf11d8c10e30" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">enum <a class="el" href="classkyotocabinet_1_1LZO.html#aa071fed0e142357ee0ccbf11d8c10e30">kyotocabinet::LZO::Mode</a></td> </tr> </table> </div> <div class="memdoc"> <p>Compression modes. </p> <dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"><em><a class="anchor" id="aa071fed0e142357ee0ccbf11d8c10e30ac34dadab072289a3d840127953e50b2a"></a><!-- doxytag: member="RAW" ref="aa071fed0e142357ee0ccbf11d8c10e30ac34dadab072289a3d840127953e50b2a" args="" -->RAW</em> </td><td> <p>without any checksum </p> </td></tr> <tr><td valign="top"><em><a class="anchor" id="aa071fed0e142357ee0ccbf11d8c10e30acec1fa2fd69048d1db9e706ebd0a1195"></a><!-- doxytag: member="CRC" ref="aa071fed0e142357ee0ccbf11d8c10e30acec1fa2fd69048d1db9e706ebd0a1195" args="" -->CRC</em> </td><td> <p>with CRC32 checksum </p> </td></tr> </table> </dd> </dl> </div> </div> <hr/><h2>Member Function Documentation</h2> <a class="anchor" id="a4cae07a2022b55b0426bcb9629a19e7e"></a><!-- doxytag: member="kyotocabinet::LZO::compress" ref="a4cae07a2022b55b0426bcb9629a19e7e" args="(const void *buf, size_t size, size_t *sp, Mode mode=RAW)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static char* <a class="el" href="classkyotocabinet_1_1LZO.html#a4cae07a2022b55b0426bcb9629a19e7e">kyotocabinet::LZO::compress</a> </td> <td>(</td> <td class="paramtype">const void * </td> <td class="paramname"><em>buf</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">size_t </td> <td class="paramname"><em>size</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">size_t * </td> <td class="paramname"><em>sp</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classkyotocabinet_1_1LZO.html#aa071fed0e142357ee0ccbf11d8c10e30">Mode</a> </td> <td class="paramname"><em>mode</em> = <code><a class="el" href="classkyotocabinet_1_1LZO.html#aa071fed0e142357ee0ccbf11d8c10e30ac34dadab072289a3d840127953e50b2a">RAW</a></code> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Compress a serial data. </p> <dl class="params"><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramname">buf</td><td>the input buffer. </td></tr> <tr><td class="paramname">size</td><td>the size of the input buffer. </td></tr> <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> <tr><td class="paramname">mode</td><td>the compression mode. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>the pointer to the result data, or NULL on failure. </dd></dl> <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> </div> </div> <a class="anchor" id="a2164fb0f0f36d5029eb9d53ccf8c8652"></a><!-- doxytag: member="kyotocabinet::LZO::decompress" ref="a2164fb0f0f36d5029eb9d53ccf8c8652" args="(const void *buf, size_t size, size_t *sp, Mode mode=RAW)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static char* <a class="el" href="classkyotocabinet_1_1LZO.html#a2164fb0f0f36d5029eb9d53ccf8c8652">kyotocabinet::LZO::decompress</a> </td> <td>(</td> <td class="paramtype">const void * </td> <td class="paramname"><em>buf</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">size_t </td> <td class="paramname"><em>size</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">size_t * </td> <td class="paramname"><em>sp</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classkyotocabinet_1_1LZO.html#aa071fed0e142357ee0ccbf11d8c10e30">Mode</a> </td> <td class="paramname"><em>mode</em> = <code><a class="el" href="classkyotocabinet_1_1LZO.html#aa071fed0e142357ee0ccbf11d8c10e30ac34dadab072289a3d840127953e50b2a">RAW</a></code> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Decompress a serial data. </p> <dl class="params"><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramname">buf</td><td>the input buffer. </td></tr> <tr><td class="paramname">size</td><td>the size of the input buffer. </td></tr> <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> <tr><td class="paramname">mode</td><td>the compression mode. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>the pointer to the result data, or NULL on failure. </dd></dl> <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> </div> </div> <a class="anchor" id="aa18945773d9ed6722ade4f336ed6b8b5"></a><!-- doxytag: member="kyotocabinet::LZO::calculate_crc" ref="aa18945773d9ed6722ade4f336ed6b8b5" args="(const void *buf, size_t size, uint32_t seed=0)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static uint32_t <a class="el" href="classkyotocabinet_1_1LZO.html#aa18945773d9ed6722ade4f336ed6b8b5">kyotocabinet::LZO::calculate_crc</a> </td> <td>(</td> <td class="paramtype">const void * </td> <td class="paramname"><em>buf</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">size_t </td> <td class="paramname"><em>size</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">uint32_t </td> <td class="paramname"><em>seed</em> = <code>0</code> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Calculate the CRC32 checksum of a serial data. </p> <dl class="params"><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramname">buf</td><td>the input buffer. </td></tr> <tr><td class="paramname">size</td><td>the size of the input buffer. </td></tr> <tr><td class="paramname">seed</td><td>the cyclic seed value. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>the CRC32 checksum. </dd></dl> </div> </div> </div><!-- contents --> <hr class="footer"/><address class="footer"><small> Generated on Fri May 25 2012 01:21:36 for Kyoto Cabinet by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.7.6.1 </small></address> </body> </html>