KArchive
kcompressiondevice.cpp
87 if (fileName.endsWith(QLatin1String(".lzma"), Qt::CaseInsensitive) || fileName.endsWith(QLatin1String(".xz"), Qt::CaseInsensitive)) {
105KCompressionDevice::CompressionType KCompressionDevice::compressionTypeForMimeType(const QString &mimeType)
189KCompressionDevice::KCompressionDevice(QIODevice *inputDevice, bool autoDeleteInputDevice, CompressionType type)
407 // qCDebug(KArchiveLog) << "avail_out = " << filter->outBufferAvailable() << " result=" << d->result << " outReceived=" << outReceived;
409 // qCWarning(KArchiveLog) << " last availOut " << availOut << " smaller than new avail_out=" << filter->outBufferAvailable() << " !";
465 // qCDebug(KArchiveLog) << " Wrote everything for now. avail_in=" << filter->inBufferAvailable() << "result=" << d->result << "wrote=" << wrote;
472 // qCDebug(KArchiveLog) << " availIn=" << availIn << "dataWritten=" << dataWritten << "pos=" << pos();
479 // qCDebug(KArchiveLog) << " writing to underlying. avail_out=" << filter->outBufferAvailable();
485 // qCWarning(KArchiveLog) << "KCompressionDevice::write. Could only write " << size << " out of " << towrite << " bytes";
void setOrigFileName(const QByteArray &fileName)
For writing gzip compressed files only: set the name of the original file, to be used in the gzip hea...
Definition kcompressiondevice.cpp:504
KCompressionDevice(QIODevice *inputDevice, bool autoDeleteInputDevice, CompressionType type)
Constructs a KCompressionDevice for a given CompressionType (e.g.
Definition kcompressiondevice.cpp:189
static CompressionType compressionTypeForMimeType(const QString &mimetype)
Returns the compression type for the given MIME type, if possible.
Definition kcompressiondevice.cpp:105
static KFilterBase * filterForCompressionType(CompressionType type)
Call this to create the appropriate filter for the CompressionType named type.
Definition kcompressiondevice.cpp:160
QFileDevice::FileError error() const
Returns the error code from the last failing operation.
Definition kcompressiondevice.cpp:289
bool seek(qint64) override
That one can be quite slow, when going back.
Definition kcompressiondevice.cpp:294
CompressionType compressionType() const
The compression actually used by this device.
Definition kcompressiondevice.cpp:227
~KCompressionDevice() override
Destructs the KCompressionDevice.
Definition kcompressiondevice.cpp:218
void setSkipHeaders()
Call this let this device skip the gzip headers when reading/writing.
Definition kcompressiondevice.cpp:509
bool open(QIODevice::OpenMode mode) override
Open for reading or writing.
Definition kcompressiondevice.cpp:232
This is the base class for compression filters such as gzip and bzip2.
Definition kfilterbase.h:27
NoError
char * data()
qsizetype size() const const
FileError
QIODevice()
virtual bool atEnd() const const
virtual void close()
QString errorString() const const
bool isOpen() const const
virtual qint64 pos() const const
QByteArray read(qint64 maxSize)
virtual bool seek(qint64 pos)
void setErrorString(const QString &str)
void setOpenMode(QIODeviceBase::OpenMode openMode)
virtual qint64 size() const const
qint64 write(const QByteArray &data)
typedef OpenMode
QMimeType mimeTypeForName(const QString &nameOrAlias) const const
bool inherits(const QString &mimeTypeName) const const
bool isValid() const const
QString tr(const char *sourceText, const char *disambiguation, int n)
None
bool endsWith(QChar c, Qt::CaseSensitivity cs) const const
CaseInsensitive
QFuture< void > filter(QThreadPool *pool, Sequence &sequence, KeepFunctor &&filterFunction)
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Thu Jan 23 2025 18:58:58 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Thu Jan 23 2025 18:58:58 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.