PDA

View Full Version : GUnzipDevice - QIODevice



zaphod77
1st April 2011, 21:22
Hi coderz :cool:
i searched for a good QByteArray-extract-from-GZip-File solution and did not succeed.
So i decided to wrap some codez, and create a small interface.

// sample usage
void method() {
QByteArray ar;
QFile qfile("names.txt.gz");
qfile.open(QIODevice::ReadOnly);
// ar will be filled with extracted bytes
int extractedBytes = GUnzipDevice::getBytes(&qfile, ar);
...
}
If you are interested,
you can download at http://genericengine.net/downloads/ (second section)

zip-archive has a README.txt and contains of small source, testfile names.txt.gz and windows and linux executeable.

It is very easy to embedd within Qt App Codez.

greetings and best codez!
cheers
zaphod