thanks,
but it looks like another full-blown-zip-archive library - I need only gzipping one file (something more lightweight)
niko
thanks,
but it looks like another full-blown-zip-archive library - I need only gzipping one file (something more lightweight)
niko
So maybe using QProcess and gzip would be more suitable?
that would be the easiest i guess...
but would work only on unix
or does something comparable exist on win32?
Yes, you might use gzip from Cygwin ... I guess ..
sure, that will work
but the users of my application won't be happy about that![]()
zlib is fairly lightweight, you may want to try it. http://www.zlib.net/. This is the same compression library that Qt uses, but it doesn't expose the gzip functionality.
i was thinking about that too.
but where to start?
could you give me some hints?
(i have almost no c++ experience)
thanks
niko
zlib is C, not C++. I have never used it directly. My first step would be to read its documentation and look at any example programs. You may also want to look at the qCompress sources to see how Trolltech uses it.
hooray, it works
this is how I did it:
Qt Code:
gzFile file; file = gzopen (fileName.toUtf8().data(), "rb"); if(!file) { return; } QByteArray input; char buffer[1024]; QByteArray inputData; while(int readBytes = gzread (file, buffer, 1024)) { } gzclose(file);To copy to clipboard, switch view to plain text mode
thanks for the help....
niko
Bookmarks