File indexing completed on 2025-01-26 04:24:53
0001 #ifndef QUAADLER32_H 0002 #define QUAADLER32_H 0003 0004 /* 0005 Copyright (C) 2010 Adam Walczak 0006 Copyright (C) 2005-2014 Sergey A. Tachenov 0007 0008 This file is part of QuaZIP. 0009 0010 QuaZIP is free software: you can redistribute it and/or modify 0011 it under the terms of the GNU Lesser General Public License as published by 0012 the Free Software Foundation, either version 2.1 of the License, or 0013 (at your option) any later version. 0014 0015 QuaZIP is distributed in the hope that it will be useful, 0016 but WITHOUT ANY WARRANTY; without even the implied warranty of 0017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0018 GNU Lesser General Public License for more details. 0019 0020 You should have received a copy of the GNU Lesser General Public License 0021 along with QuaZIP. If not, see <http://www.gnu.org/licenses/>. 0022 0023 See COPYING file for the full LGPL text. 0024 0025 Original ZIP package is copyrighted by Gilles Vollant and contributors, 0026 see quazip/(un)zip.h files for details. Basically it's the zlib license. 0027 */ 0028 0029 #include <QByteArray> 0030 0031 #include "quachecksum32.h" 0032 0033 /// Adler32 checksum 0034 /** \class QuaAdler32 quaadler32.h <quazip/quaadler32.h> 0035 * This class wrappers the adler32 function with the QuaChecksum32 interface. 0036 * See QuaChecksum32 for more info. 0037 */ 0038 class QUAZIP_EXPORT QuaAdler32 : public QuaChecksum32 0039 { 0040 0041 public: 0042 QuaAdler32(); 0043 0044 quint32 calculate(const QByteArray &data); 0045 0046 void reset(); 0047 void update(const QByteArray &buf); 0048 quint32 value(); 0049 0050 private: 0051 quint32 checksum; 0052 }; 0053 0054 #endif //QUAADLER32_H