QuaZIP quazip-0-7-2
|
00001 #ifndef QUAADLER32_H 00002 #define QUAADLER32_H 00003 00004 /* 00005 Copyright (C) 2010 Adam Walczak 00006 Copyright (C) 2005-2014 Sergey A. Tachenov 00007 00008 This file is part of QuaZIP. 00009 00010 QuaZIP is free software: you can redistribute it and/or modify 00011 it under the terms of the GNU Lesser General Public License as published by 00012 the Free Software Foundation, either version 2.1 of the License, or 00013 (at your option) any later version. 00014 00015 QuaZIP is distributed in the hope that it will be useful, 00016 but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00018 GNU Lesser General Public License for more details. 00019 00020 You should have received a copy of the GNU Lesser General Public License 00021 along with QuaZIP. If not, see <http://www.gnu.org/licenses/>. 00022 00023 See COPYING file for the full LGPL text. 00024 00025 Original ZIP package is copyrighted by Gilles Vollant and contributors, 00026 see quazip/(un)zip.h files for details. Basically it's the zlib license. 00027 */ 00028 00029 #include <QByteArray> 00030 00031 #include "quachecksum32.h" 00032 00034 00038 class QUAZIP_EXPORT QuaAdler32 : public QuaChecksum32 00039 { 00040 00041 public: 00042 QuaAdler32(); 00043 00044 quint32 calculate(const QByteArray &data); 00045 00046 void reset(); 00047 void update(const QByteArray &buf); 00048 quint32 value(); 00049 00050 private: 00051 quint32 checksum; 00052 }; 00053 00054 #endif //QUAADLER32_H