ff7tk  0.02
Toolkit for making FF7 Tools
GZIPPS.h
Go to the documentation of this file.
1 /****************************************************************************
2  ** Néo-Midgar Final Fantasy VII French Retranslation
3  ** Copyright (C) 2009-2012 Arzel Jérôme <myst6re@gmail.com>
4  **
5  ** This program is free software: you can redistribute it and/or modify
6  ** it under the terms of the GNU General Public License as published by
7  ** the Free Software Foundation, either version 3 of the License, or
8  ** (at your option) any later version.
9  **
10  ** This program is distributed in the hope that it will be useful,
11  ** but WITHOUT ANY WARRANTY; without even the implied warranty of
12  ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  ** GNU General Public License for more details.
14  **
15  ** You should have received a copy of the GNU General Public License
16  ** along with this program. If not, see <http://www.gnu.org/licenses/>.
17  ****************************************************************************/
18 #ifndef GZIPPS_H
19 #define GZIPPS_H
20 
21 #include "GZIP.h"
22 
23 #define GZIPPS_HEADER_SIZE 8
24 
25 class GZIPPS
26 {
27 public:
28  inline static QByteArray decompress(const QByteArray &data) {
29  return decompress(data.constData(), data.size());
30  }
31  inline static QByteArray compress(const QByteArray &ungzip, const QByteArray &header, int level = -1) {
32  return compress(ungzip.constData(), ungzip.size(), header, level);
33  }
34  inline static QByteArray compress(const QByteArray &ungzip, quint32 header, int level = -1) {
35  return compress(ungzip.constData(), ungzip.size(), header, level);
36  }
37  static QByteArray decompress(const char *data, int size);
38  static QByteArray compress(const char *ungzip, int size, const QByteArray &header, int level = -1);
39  inline static QByteArray compress(const char *ungzip, int size, quint32 header, int level = -1) {
40  return compress(ungzip, size, QByteArray((char *)&header, 4), level);
41  }
42 };
43 
44 #endif // GZIPPS_H
static QByteArray decompress(const QByteArray &data)
Definition: GZIPPS.h:28
static QByteArray compress(const QByteArray &ungzip, const QByteArray &header, int level=-1)
Definition: GZIPPS.h:31
static QByteArray compress(const char *ungzip, int size, quint32 header, int level=-1)
Definition: GZIPPS.h:39
static QByteArray compress(const QByteArray &ungzip, quint32 header, int level=-1)
Definition: GZIPPS.h:34
Definition: GZIPPS.h:25