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 |
|
33 |
/// Adler32 checksum |
34 |
/** \class QuaAdler32 quaadler32.h <quazip/quaadler32.h> |
35 |
* This class wrappers the adler32 function with the QuaChecksum32 interface. |
36 |
* See QuaChecksum32 for more info. |
37 |
*/ |
38 |
class QUAZIP_EXPORT QuaAdler32 : public QuaChecksum32 |
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 |