ckb-next  v0.2.8 at branch master
ckb-next driver for corsair devices
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
quaadler32.h
Go to the documentation of this file.
1 #ifndef QUAADLER32_H
2 #define QUAADLER32_H
3 
4 /*
5 Copyright (C) 2010 Adam Walczak
6 Copyright (C) 2005-2014 Sergey A. Tachenov
7 
8 This file is part of QuaZIP.
9 
10 QuaZIP is free software: you can redistribute it and/or modify
11 it under the terms of the GNU Lesser General Public License as published by
12 the Free Software Foundation, either version 2.1 of the License, or
13 (at your option) any later version.
14 
15 QuaZIP is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU Lesser General Public License for more details.
19 
20 You should have received a copy of the GNU Lesser General Public License
21 along with QuaZIP. If not, see <http://www.gnu.org/licenses/>.
22 
23 See COPYING file for the full LGPL text.
24 
25 Original ZIP package is copyrighted by Gilles Vollant and contributors,
26 see quazip/(un)zip.h files for details. Basically it's the zlib license.
27 */
28 
29 #include <QByteArray>
30 
31 #include "quachecksum32.h"
32 
34 
39 {
40 
41 public:
42  QuaAdler32();
43 
44  quint32 calculate(const QByteArray &data);
45 
46  void reset();
47  void update(const QByteArray &buf);
48  quint32 value();
49 
50 private:
51  quint32 checksum;
52 };
53 
54 #endif //QUAADLER32_H
Adler32 checksum.
Definition: quaadler32.h:38
quint32 checksum
Definition: quaadler32.h:51
virtual quint32 calculate(const QByteArray &data)=0
Calculates the checksum for data.
virtual quint32 value()=0
Value of the checksum calculated for the stream passed throw update().
Checksum interface.
Definition: quachecksum32.h:52
virtual void update(const QByteArray &buf)=0
Updates the calculated checksum for the stream.
virtual void reset()=0
Resets the calculation on a checksun for a stream.
#define QUAZIP_EXPORT
This is automatically defined when building a static library, but when including QuaZip sources direc...
Definition: quazip_global.h:46