misc/quazip/quacrc32.h
author sheepluva
Thu, 15 Sep 2011 09:19:56 +0200
changeset 5911 4a28d0ae9624
parent 5752 ea95ee97c805
permissions -rw-r--r--
based on the fact that the crash never seemed to have happened with default screen resolutions and also inspired by the only other getmem usage in the code I came up with this simple solution which seems to work just fine. I do not understand why getmem seems to need this, but well - feel free to explain.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5752
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
     1
#ifndef QUACRC32_H
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
     2
#define QUACRC32_H
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
     3
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
     4
#include "quachecksum32.h"
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
     5
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
     6
///CRC32 checksum
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
     7
/** \class QuaCrc32 quacrc32.h <quazip/quacrc32.h>
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
     8
* This class wrappers the crc32 function with the QuaChecksum32 interface.
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
     9
* See QuaChecksum32 for more info.
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    10
*/
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    11
class QUAZIP_EXPORT QuaCrc32 : public QuaChecksum32 {
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    12
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    13
public:
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    14
	QuaCrc32();
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    15
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    16
	quint32 calculate(const QByteArray &data);
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    17
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    18
	void reset();
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    19
	void update(const QByteArray &buf);
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    20
	quint32 value();
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    21
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    22
private:
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    23
	quint32 checksum;
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    24
};
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    25
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    26
#endif //QUACRC32_H