source: s10k/CommonLibs/quazip-0.7.2/doc/html/classQuaChecksum32.html

Last change on this file was 1096, checked in by s10k, 7 years ago

Added zlib, quazip, basicxmlsyntaxhighlighter, conditionalsemaphore and linenumberdisplay libraries. zlib and quazip are pre-compiled, but you can compile them yourself, just delete the dll files (or equivalent binary files to your OS)

File size: 9.5 KB
RevLine 
[1096]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>QuaZIP: QuaChecksum32 Class 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.7.4 -->
11<div id="top">
12<div id="titlearea">
13<table cellspacing="0" cellpadding="0">
14 <tbody>
15 <tr style="height: 56px;">
16 <td style="padding-left: 0.5em;">
17 <div id="projectname">QuaZIP&#160;<span id="projectnumber">quazip-0-7-2</span></div>
18 </td>
19 </tr>
20 </tbody>
21</table>
22</div>
23 <div id="navrow1" class="tabs">
24 <ul class="tablist">
25 <li><a href="index.html"><span>Main&#160;Page</span></a></li>
26 <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
27 <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
28 <li><a href="files.html"><span>Files</span></a></li>
29 <li><a href="dirs.html"><span>Directories</span></a></li>
30 </ul>
31 </div>
32 <div id="navrow2" class="tabs2">
33 <ul class="tablist">
34 <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
35 <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
36 <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
37 </ul>
38 </div>
39</div>
40<div class="header">
41 <div class="summary">
42<a href="#pub-methods">Public Member Functions</a> </div>
43 <div class="headertitle">
44<div class="title">QuaChecksum32 Class Reference</div> </div>
45</div>
46<div class="contents">
47<!-- doxytag: class="QuaChecksum32" -->
48<p>Checksum interface.
49 <a href="classQuaChecksum32.html#details">More...</a></p>
50
51<p><code>#include &lt;<a class="el" href="quachecksum32_8h_source.html">quazip/quachecksum32.h</a>&gt;</code></p>
52<div class="dynheader">
53Inheritance diagram for QuaChecksum32:</div>
54<div class="dyncontent">
55<div class="center"><img src="classQuaChecksum32__inherit__graph.png" border="0" usemap="#QuaChecksum32_inherit__map" alt="Inheritance graph"/></div>
56<map name="QuaChecksum32_inherit__map" id="QuaChecksum32_inherit__map">
57<area shape="rect" id="node3" href="classQuaAdler32.html" title="Adler32 checksum." alt="" coords="5,80,96,107"/>
58<area shape="rect" id="node5" href="classQuaCrc32.html" title="CRC32 checksum." alt="" coords="120,80,200,107"/>
59</map>
60<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
61
62<p><a href="classQuaChecksum32-members.html">List of all members.</a></p>
63<table class="memberdecls">
64<tr><td colspan="2"><h2><a name="pub-methods"></a>
65Public Member Functions</h2></td></tr>
66<tr><td class="memItemLeft" align="right" valign="top">virtual quint32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQuaChecksum32.html#a14d800fcfd55b2ae11ef07d3924fe0b1">calculate</a> (const <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qbytearray.html">QByteArray</a> &amp;data)=0</td></tr>
67<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculates the checksum for data. <a href="#a14d800fcfd55b2ae11ef07d3924fe0b1"></a><br/></td></tr>
68<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad3f5db3c76b00069db9bda333cb49d57"></a><!-- doxytag: member="QuaChecksum32::reset" ref="ad3f5db3c76b00069db9bda333cb49d57" args="()=0" -->
69virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQuaChecksum32.html#ad3f5db3c76b00069db9bda333cb49d57">reset</a> ()=0</td></tr>
70<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Resets the calculation on a checksun for a stream. <br/></td></tr>
71<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQuaChecksum32.html#a63a6ed3171f9243214d307da67557f7e">update</a> (const <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qbytearray.html">QByteArray</a> &amp;buf)=0</td></tr>
72<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Updates the calculated checksum for the stream. <a href="#a63a6ed3171f9243214d307da67557f7e"></a><br/></td></tr>
73<tr><td class="memItemLeft" align="right" valign="top">virtual quint32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQuaChecksum32.html#afd836e7534194fce08356be6a8336da7">value</a> ()=0</td></tr>
74<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Value of the checksum calculated for the stream passed throw <a class="el" href="classQuaChecksum32.html#a63a6ed3171f9243214d307da67557f7e" title="Updates the calculated checksum for the stream.">update()</a>. <a href="#afd836e7534194fce08356be6a8336da7"></a><br/></td></tr>
75</table>
76<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
77<div class="textblock"><p>Checksum interface. </p>
78<p>This is an interface for 32 bit checksums. Classes implementing this interface can calcunate a certin checksum in a single step: </p>
79<div class="fragment"><pre class="fragment"> QChecksum32 *crc32 = <span class="keyword">new</span> <a class="code" href="classQuaCrc32.html" title="CRC32 checksum.">QuaCrc32</a>();
80 rasoult = crc32-&gt;calculate(data);
81</pre></div><p> or by streaming the data: </p>
82<div class="fragment"><pre class="fragment"> QChecksum32 *crc32 = <span class="keyword">new</span> <a class="code" href="classQuaCrc32.html" title="CRC32 checksum.">QuaCrc32</a>();
83 <span class="keywordflow">while</span>(!fileA.atEnd())
84 crc32-&gt;update(fileA.read(bufSize));
85 resoultA = crc32-&gt;value();
86 crc32-&gt;reset();
87 <span class="keywordflow">while</span>(!fileB.atEnd())
88 crc32-&gt;update(fileB.read(bufSize));
89 resoultB = crc32-&gt;value();
90</pre></div> </div><hr/><h2>Member Function Documentation</h2>
91<a class="anchor" id="a14d800fcfd55b2ae11ef07d3924fe0b1"></a><!-- doxytag: member="QuaChecksum32::calculate" ref="a14d800fcfd55b2ae11ef07d3924fe0b1" args="(const QByteArray &amp;data)=0" -->
92<div class="memitem">
93<div class="memproto">
94 <table class="memname">
95 <tr>
96 <td class="memname">virtual quint32 QuaChecksum32::calculate </td>
97 <td>(</td>
98 <td class="paramtype">const <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qbytearray.html">QByteArray</a> &amp;&#160;</td>
99 <td class="paramname"><em>data</em></td><td>)</td>
100 <td><code> [pure virtual]</code></td>
101 </tr>
102 </table>
103</div>
104<div class="memdoc">
105
106<p>Calculates the checksum for data. </p>
107<p><em>data</em> source data </p>
108<dl class="return"><dt><b>Returns:</b></dt><dd>data checksum</dd></dl>
109<p>This function has no efect on the value returned by <a class="el" href="classQuaChecksum32.html#afd836e7534194fce08356be6a8336da7" title="Value of the checksum calculated for the stream passed throw update().">value()</a>. </p>
110
111<p>Implemented in <a class="el" href="classQuaAdler32.html#a350e84fd000ebfa3c33503336a7b21bb">QuaAdler32</a>, and <a class="el" href="classQuaCrc32.html#aaf6fdf6e36e55c97bf9eab6ec65ecb9e">QuaCrc32</a>.</p>
112
113</div>
114</div>
115<a class="anchor" id="a63a6ed3171f9243214d307da67557f7e"></a><!-- doxytag: member="QuaChecksum32::update" ref="a63a6ed3171f9243214d307da67557f7e" args="(const QByteArray &amp;buf)=0" -->
116<div class="memitem">
117<div class="memproto">
118 <table class="memname">
119 <tr>
120 <td class="memname">virtual void QuaChecksum32::update </td>
121 <td>(</td>
122 <td class="paramtype">const <a class="elRef" doxygen="qtcore.tags:http://doc.qt.io/qt-5//" href="http://doc.qt.io/qt-5/qbytearray.html">QByteArray</a> &amp;&#160;</td>
123 <td class="paramname"><em>buf</em></td><td>)</td>
124 <td><code> [pure virtual]</code></td>
125 </tr>
126 </table>
127</div>
128<div class="memdoc">
129
130<p>Updates the calculated checksum for the stream. </p>
131<p><em>buf</em> next portion of data from the stream </p>
132
133<p>Implemented in <a class="el" href="classQuaAdler32.html#aba24f7b16aa0cdc26f81a9ad687fc653">QuaAdler32</a>, and <a class="el" href="classQuaCrc32.html#a5015d80e04afe6e6d094155b7e99888e">QuaCrc32</a>.</p>
134
135</div>
136</div>
137<a class="anchor" id="afd836e7534194fce08356be6a8336da7"></a><!-- doxytag: member="QuaChecksum32::value" ref="afd836e7534194fce08356be6a8336da7" args="()=0" -->
138<div class="memitem">
139<div class="memproto">
140 <table class="memname">
141 <tr>
142 <td class="memname">virtual quint32 QuaChecksum32::value </td>
143 <td>(</td>
144 <td class="paramname"></td><td>)</td>
145 <td><code> [pure virtual]</code></td>
146 </tr>
147 </table>
148</div>
149<div class="memdoc">
150
151<p>Value of the checksum calculated for the stream passed throw <a class="el" href="classQuaChecksum32.html#a63a6ed3171f9243214d307da67557f7e" title="Updates the calculated checksum for the stream.">update()</a>. </p>
152<dl class="return"><dt><b>Returns:</b></dt><dd>checksum </dd></dl>
153
154<p>Implemented in <a class="el" href="classQuaAdler32.html#a2022e1db95c23cef220b335e44d74fb1">QuaAdler32</a>, and <a class="el" href="classQuaCrc32.html#a957ce46a53862f75c89d6a3ac4f73389">QuaCrc32</a>.</p>
155
156</div>
157</div>
158<hr/>The documentation for this class was generated from the following file:<ul>
159<li>quazip/<a class="el" href="quachecksum32_8h_source.html">quachecksum32.h</a></li>
160</ul>
161</div>
162<hr class="footer"/><address class="footer"><small>Generated on Sun Apr 3 2016 08:26:25 for QuaZIP by&#160;
163<a href="http://www.doxygen.org/index.html">
164<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
165</body>
166</html>
Note: See TracBrowser for help on using the repository browser.