×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Regular Contributor
    Join Date
    Nov 2007
    Posts
    130

    Question how to open *.zip/*.epub file and extract all files in directory

    Hi,

    Can anyone please help me how to extract *.zip/*.epub file and get all the files in a directory through Qt code.

    Regards,
    Bala

  2. #2
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: how to open *.zip/*.epub file and extract all files in directory

    You can load file into QByteArray and then use qUncompress:
    http://doc.trolltech.com/4.6/qbytear...ml#qUncompress

  3. #3
    Nokia Developer Champion
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: how to open *.zip/*.epub file and extract all files in directory

    For background, the ZIP file format is online:
    http://www.pkware.com/support/zip-application-note

  4. #4
    Nokia Developer Champion
    Join Date
    Mar 2009
    Posts
    430

    Re: how to open *.zip/*.epub file and extract all files in directory

    Quote Originally Posted by divanov View Post
    You can load file into QByteArray and then use qUncompress:
    http://doc.trolltech.com/4.6/qbytear...ml#qUncompress
    There will be something more to do because a Zip-File can contain more than one file and even a directory structure. This has to be handled somehow.

  5. #5
    Nokia Developer Champion
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: how to open *.zip/*.epub file and extract all files in directory

    Well, there's enough info in the PKWare ZIP reference document below to roll your own (I've done it three times now), but one would hope that someone has already written zip support for Qt.

    The uncompress is actually the easy part (even without the QByteArray stuff), since the ZLIB compress code is readily available off the net.

  6. #6
    Regular Contributor
    Join Date
    Nov 2007
    Posts
    130

    Re: how to open *.zip/*.epub file and extract all files in directory

    Hi,

    Can anyone please explain clearly how to load zip file and where to load it and how to uncompress that and get the files which are inside. I don't have clear idea of these things.

    I have a zip file which contains two html files. Now I want to load it and uncompress that zip file and get the html files. My question is where to load zip file and what functionality I should use to uncompress. Please help me.

    Also I would like to know does qt for symbian supports zip/epub format?

    Regards,
    Bala
    Last edited by BalajiR; 2010-03-18 at 05:56.

  7. #7
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: how to open *.zip/*.epub file and extract all files in directory

    Did you check Azardi source as proposed by Lucian?

Similar Threads

  1. Extract Image From .MMS File?
    By Mengels7 in forum General Messaging
    Replies: 0
    Last Post: 2009-04-14, 21:17
  2. Add files to sis file
    By kfke in forum Symbian Signed Support, Application Packaging and Distribution and Security
    Replies: 14
    Last Post: 2009-03-10, 15:05
  3. need newer version of misty
    By bk_manu in forum Symbian
    Replies: 14
    Last Post: 2008-09-10, 13:23
  4. HOWTO-Deploy-J2ME-To-N-Gage-Via-USB
    By ebaskoro in forum Mobile Java General
    Replies: 0
    Last Post: 2004-07-06, 18:18
  5. HOWTO-Deploy-J2ME-To-N-Gage-Via-USB
    By ebaskoro in forum Mobile Java General
    Replies: 0
    Last Post: 2004-07-06, 18:17

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •