<!doctype html>
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
<div>
Hi,
<br>
</div>
<div>
<br>
</div>
<div>
The first question " I have tried to do this but there some error that block me to open a file. I dont know if i am using correctly the class KCompressionDevice." is related with the code down bellow.
<br>
</div>
<div>
<br>
</div>
<div>
<br>auto kgzip = KCompressionDevice(QUrl(where.toString() + “/” + fileName + “.gz”).toLocalFile(), KCompressionDevice::GZip);
<div>
assert(kgzip.isOpen() == true);
</div>
<br>
<br>
<div>
kgzip.write(QString("hello World").toUtf8());
</div>
<div>
kgzip.close();
</div>
<div>
<br>
</div>
</div>
<blockquote type="cite">
<div>
El 02/11/2020 22:34 Albert Astals Cid <<a href="mailto:aacid@kde.org">aacid@kde.org</a>> escribió:
</div>
<div>
<br>
</div>
<div>
<br>
</div>
<div>
El dilluns, 2 de novembre de 2020, a les 22:23:44 CET, Gabriel Domínguez Camarero va escriure:
</div>
<blockquote type="cite">
<div>
Hello I am gabridc,
</div>
</blockquote>
<div>
Hello Gabriel, this KDE Frameworks devel is for discussion around development *of* KDE Frameworks not *with* KDE Frameworks, your question belongs to <a href="mailto:kde-devel@kde.org">kde-devel@kde.org</a>
<br>
</div>
<div>
<br>
</div>
<blockquote type="cite">
<div>
<br>
</div>
<div>
<br>
</div>
<div>
I am a developer for Index-fm and we are trying to integrate KArchive in the file explorer, I have tried to do this but there some error that block me to open a file. I dont know if i am using correctly the class KCompressionDevice.
</div>
</blockquote>
<div>
Is this question related to the code down below? or different?
</div>
<div>
<br>
</div>
<blockquote type="cite">
<div>
Also, I would to ask another question because I would like to write a file inside my file.gz but in this case I dont have the function writeFile like KTar or KZip classes.
</div>
</blockquote>
<div>
You can't write a file *inside* a gz file, a gz is not multiple files, it's just one file (a .tar.gz is still just one gz file, it's the tar part that has multiple files).
</div>
<div>
<br>
</div>
<div>
Cheers,
</div>
<div>
Albert
</div>
<div>
<br>
</div>
<blockquote type="cite">
<div>
<br>
</div>
<div>
<br>
</div>
<div>
auto kgzip = KCompressionDevice(QUrl(where.toString() + “/” + fileName + “.gz”).toLocalFile(), KCompressionDevice::GZip);
</div>
<div>
assert(kgzip.isOpen() == true);
</div>
<div>
<br>
</div>
<div>
<br>
</div>
<div>
kgzip.write(QString("hello World").toUtf8());
</div>
<div>
kgzip.close();
</div>
</blockquote>
</blockquote>
</body>
</html>