From a55f8f218ea9b52e97b9b7de1ac43502ce8c9994 Mon Sep 17 00:00:00 2001 From: Tomasz Sterna Date: Mon, 5 Jan 2015 17:19:18 +0100 Subject: Imported QuaZIP library to daemon sources --- daemon/quazip/quacrc32.h | 50 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 daemon/quazip/quacrc32.h (limited to 'daemon/quazip/quacrc32.h') diff --git a/daemon/quazip/quacrc32.h b/daemon/quazip/quacrc32.h new file mode 100644 index 0000000..2582de8 --- /dev/null +++ b/daemon/quazip/quacrc32.h @@ -0,0 +1,50 @@ +#ifndef QUACRC32_H +#define QUACRC32_H + +/* +Copyright (C) 2005-2014 Sergey A. Tachenov + +This file is part of QuaZIP. + +QuaZIP is free software: you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +QuaZIP is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with QuaZIP. If not, see . + +See COPYING file for the full LGPL text. + +Original ZIP package is copyrighted by Gilles Vollant and contributors, +see quazip/(un)zip.h files for details. Basically it's the zlib license. +*/ + +#include "quachecksum32.h" + +///CRC32 checksum +/** \class QuaCrc32 quacrc32.h +* This class wrappers the crc32 function with the QuaChecksum32 interface. +* See QuaChecksum32 for more info. +*/ +class QUAZIP_EXPORT QuaCrc32 : public QuaChecksum32 { + +public: + QuaCrc32(); + + quint32 calculate(const QByteArray &data); + + void reset(); + void update(const QByteArray &buf); + quint32 value(); + +private: + quint32 checksum; +}; + +#endif //QUACRC32_H -- cgit v1.2.3