5#include <archive_entry.h>
29 if (mode != ReadOnly) {
30 _errorString = QStringLiteral(
"QGCDecompressDevice only supports ReadOnly mode");
49 return QIODevice::open(mode);
60 _errorString = QStringLiteral(
"Failed to create archive reader");
73 struct archive_entry *entry =
nullptr;
74 if (archive_read_next_header(
_archive, &entry) != ARCHIVE_OK) {
84 qCDebug(QGCDecompressDeviceLog) <<
"Opened compressed stream, format:" <<
_formatName
QIODevice wrapper for streaming decompression.
#define QGC_LOGGING_CATEGORY(name, categoryStr)
void captureFormatInfo()
Capture format info from the archive after first header read.
struct archive * _archive
void configureArchiveFormats(bool allFormats)
virtual void resetState()
Reset all state (called by close())
bool initSourceFromPath()
bool prepareForReading() override
QGCDecompressDevice(QIODevice *source, QObject *parent=nullptr)
bool initArchive() override
void resetState() override
Reset all state (called by close())
bool open(OpenMode mode) override