swift
compressutils.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (C) 2018 swift Project Community / Contributors
2 // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
3 
5 
6 #ifndef SWIFT_MISC_COMPRESSUTILS_H
7 #define SWIFT_MISC_COMPRESSUTILS_H
8 
9 #include <QByteArray>
10 #include <QStringList>
11 
12 #include "misc/swiftmiscexport.h"
13 
14 class QProcess;
15 
16 namespace swift::misc
17 {
20  {
21  public:
22  CCompressUtils() = delete;
23 
26  static QByteArray lengthHeader(qint32 size);
27 
30  static bool zip7Uncompress(const QString &file, const QString &directory,
31  QStringList *stdOutAndError = nullptr);
32 
35  static bool hasZip7(QStringList *stdOutAndError = nullptr);
36 
39  static bool whichZip7(QStringList *stdOutAndError = nullptr);
40 
41  private:
42  static bool runZip7Process(QProcess *zipProcess, QStringList *stdOutAndError);
43  };
44 } // namespace swift::misc
45 
46 #endif // SWIFT_MISC_COMPRESSUTILS_H
Compress utilities.
Definition: compressutils.h:20
Free functions in swift::misc.
#define SWIFT_MISC_EXPORT
Export a class or function from the library.