Results 1 to 1 of 1

Thread: GUnzipDevice - QIODevice

  1. #1
    Join Date
    Mar 2011
    Location
    Germany, Munic
    Posts
    6
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default GUnzipDevice - QIODevice

    Hi coderz
    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.
    Qt Code:
    1. // sample usage
    2. void method() {
    3. QFile qfile("names.txt.gz");
    4. qfile.open(QIODevice::ReadOnly);
    5. // ar will be filled with extracted bytes
    6. int extractedBytes = GUnzipDevice::getBytes(&qfile, ar);
    7. ...
    8. }
    To copy to clipboard, switch view to plain text mode 
    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
    Last edited by wysota; 2nd April 2011 at 12:06.

Similar Threads

  1. QIODevice and QTextCodec?
    By whitefurrows in forum Qt Programming
    Replies: 5
    Last Post: 26th November 2010, 18:50
  2. void QIODevice::bytesWritten
    By Magu in forum Newbie
    Replies: 3
    Last Post: 25th November 2009, 09:02
  3. QIODevice
    By sabeesh in forum Newbie
    Replies: 1
    Last Post: 26th September 2007, 10:01
  4. QIODevice read()
    By ShaChris23 in forum Newbie
    Replies: 1
    Last Post: 3rd May 2007, 00:29
  5. QIODEvice
    By mickey in forum Qt Programming
    Replies: 2
    Last Post: 5th July 2006, 19:00

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.