ff7tk  0.02
Toolkit for making FF7 Tools
GZIP.h
Go to the documentation of this file.
1 /****************************************************************************
2  ** Makou Reactor Final Fantasy VII Field Script Editor
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 GZIP_H
19 #define GZIP_H
20 
21 #include <QtCore>
22 
23 class GZIP
24 {
25 public:
26  enum Strategy {
32  };
33 
34  static QByteArray decompress(const QByteArray &data, int decSize, Strategy strategy = StrategyDefault);
35  static QByteArray compress(const QByteArray &ungzip, int level = -1, Strategy strategy = StrategyDefault);
36  static QByteArray decompress(const char *data, int size, int decSize, Strategy strategy = StrategyDefault);
37  static QByteArray compress(const char *ungzip, int size, int level = -1, Strategy strategy = StrategyDefault);
38  static QByteArray decompress(const QString &path, int decSize, Strategy strategy = StrategyDefault);
39 private:
40  static char strategyToChar(Strategy strategy);
41  static QString gzMode(const char *mode, int level = -1, Strategy strategy = StrategyDefault);
42 };
43 
44 #endif // GZIP_H
static QString gzMode(const char *mode, int level=-1, Strategy strategy=StrategyDefault)
Definition: GZIP.cpp:96
static QByteArray compress(const QByteArray &ungzip, int level=-1, Strategy strategy=StrategyDefault)
Definition: GZIP.cpp:27
Definition: GZIP.h:23
Strategy
Definition: GZIP.h:26
static char strategyToChar(Strategy strategy)
Definition: GZIP.cpp:84
static QByteArray decompress(const QByteArray &data, int decSize, Strategy strategy=StrategyDefault)
Definition: GZIP.cpp:22