/src/kdegraphics-mobipocket/lib/decompressor.h
Line | Count | Source |
1 | | // SPDX-FileCopyrightText: 2008 by Jakub Stachowski <qbast@go2.pl> |
2 | | // SPDX-License-Identifier: GPL-2.0-or-later |
3 | | |
4 | | #ifndef MOBI_DECOMPRESSOR_H |
5 | | #define MOBI_DECOMPRESSOR_H |
6 | | |
7 | | #include <QByteArray> |
8 | | #include <memory> |
9 | | namespace Mobipocket |
10 | | { |
11 | | |
12 | | class Decompressor |
13 | | { |
14 | | public: |
15 | 0 | Decompressor() = default; |
16 | 0 | virtual ~Decompressor() = default; |
17 | | virtual QByteArray decompress(const QByteArray &data) = 0; |
18 | | bool isValid() const |
19 | 0 | { |
20 | 0 | return valid; |
21 | 0 | } |
22 | | |
23 | | static std::unique_ptr<Decompressor> create(quint8 type, const QVector<QByteArray> &auxData); |
24 | | |
25 | | protected: |
26 | | bool valid = false; |
27 | | }; |
28 | | } |
29 | | #endif |