Results 1 to 5 of 5

Thread: Extracting files from a zip file

  1. #1
    Join Date
    Oct 2008
    Posts
    29
    Qt products
    Qt4
    Platforms
    Windows

    Default Extracting files from a zip file

    Hi, I have to develop a program that extracts the files that are contained into a zip file.

    I don´t want to add comments, explore the zip file or process the files contained into the zip file. I only want to extract the files to a directory of the file system.

    I have read about zlib, minizip, quazip but I don´t know how to use them to extract files.

    Can you help me?

    Thanks in advance.
    Regards.
    Last edited by Althor; 10th March 2009 at 14:42.

  2. #2
    Join Date
    Aug 2007
    Location
    Wroclaw
    Posts
    20
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Extracting files from a zip file

    Hi,
    Do you think about 7-zip? You can use line command version and QProcess.
    I think this is the easiest way.

    7-zip is on LGPL so you can use it both in open and commercial projects.

  3. #3
    Join Date
    Oct 2008
    Posts
    29
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Extracting files from a zip file

    Hi,

    I can´t use external tools because my program could be used in systems that don´t have the most commons tools installted. Because of this I need to extract manually the files from the zip.

    Regards.

  4. #4
    Join Date
    Mar 2008
    Location
    Houston, Texas, USA
    Posts
    277
    Thanks
    9
    Thanked 17 Times in 17 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Maemo/MeeGo

    Default Re: Extracting files from a zip file

    I know the KDE library has classes for this. But see if you can find some libraries that handle the minimum basic api access like bzip2 does but for zip
    Qt-4.7.3 | Gentoo ~amd64 | KDE-4.7
    Aki IRC Client for KDE4 | Qt Documentation

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Extracting files from a zip file

    ZLIB will work fine for you. I'm sure there are examples on using it in its documentation. Qt links against zlib, so no additional dependencies will be required.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Generating .pro files from vcproj file or CMake file
    By ramazangirgin in forum Qt Programming
    Replies: 2
    Last Post: 17th February 2009, 09:37
  2. Extracting text from files (AKA I'm a newbie!)
    By mike phillips in forum Newbie
    Replies: 16
    Last Post: 30th January 2009, 17:27
  3. Replies: 5
    Last Post: 22nd September 2006, 08:04
  4. Replies: 11
    Last Post: 4th July 2006, 15:09
  5. [Win32/VC++ 8.0] Strange problems with qrc_*.cpp files
    By mloskot in forum Installation and Deployment
    Replies: 6
    Last Post: 6th March 2006, 10:28

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.