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";
A class for reading and writing compressed data onto a device (e.g.
Definition kcompressiondevice.h:31
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
virtual void setInBuffer(const char *data, uint size)=0
virtual bool init(int mode)=0
virtual void setOutBuffer(char *data, uint maxlen)=0
void setDevice(QIODevice *dev, bool autodelete=false)
Sets the device on which the filter will work.
Definition kfilterbase.cpp:38
virtual int mode() const =0
NoError
char * data()
void resize(qsizetype newSize, char c)
qsizetype size() const const
FileError
virtual bool atEnd() const const
virtual void close()
QString errorString() const const
bool isOpen() const const
virtual bool open(QIODeviceBase::OpenMode mode)
virtual qint64 pos() const const
QByteArray read(qint64 maxSize)
virtual bool reset()
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)
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)
bool endsWith(QChar c, Qt::CaseSensitivity cs) const const
CaseInsensitive
None
QFuture< void > filter(QThreadPool *pool, Sequence &sequence, KeepFunctor &&filterFunction)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:56:46 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:56:46 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.