Cross platform file archiving

Discussion in 'C++' started by magnus.moraberg@gmail.com, May 6, 2009.

  1. Guest

    Hi,

    I wish to archive and unarchive a set of files in a file archive via
    my program. My program is programmed using Qt4. Basically, my program
    user will download this file archive from the internet and then my
    program should be able to open the file and extract the required
    files.

    Any ideas on how I should do this from a cross platform point of view
    - Win32, Mac Os X and Linux. What file archiving method might I use?

    Thanks,

    Magnus
     
    , May 6, 2009
    #1
    1. Advertising

  2. On 6 mai, 11:41, wrote:
    > Hi,
    >
    > I wish to archive and unarchive a set of files in a file archive via
    > my program. My program is programmed using Qt4. Basically, my program
    > user will download this file archive from the internet and then my
    > program should be able to open the file and extract the required
    > files.
    >
    > Any ideas on how I should do this from a cross platform point of view
    > - Win32, Mac Os X and Linux. What file archiving method might I use?


    There is no standard way to do this. QT bundles a number of libraries
    and provides a lot of functionalities, yu may have more responses from
    a QT4 related group.

    My 2 eurocent:
    - libzip is fairly portable and fast (but compression is not
    optimal)
    - QT4 should provide a good set of network operation (otherwise
    libcurl should get you through)

    --
    Michael
     
    Michael Doubez, May 6, 2009
    #2
    1. Advertising

  3. James Kanze Guest

    On May 6, 11:41 am, wrote:

    > I wish to archive and unarchive a set of files in a file
    > archive via my program. My program is programmed using Qt4.
    > Basically, my program user will download this file archive
    > from the internet and then my program should be able to open
    > the file and extract the required files.


    > Any ideas on how I should do this from a cross platform point
    > of view - Win32, Mac Os X and Linux. What file archiving
    > method might I use?


    The simple answer is that you should use a defined archive
    format which is available on all of the platforms in question.
    There are several. Then find a portable library which
    implements it.

    Note too that you have to consider the portability of the files
    in the archive. Nothing binary is likely to be portable, and
    for text, you have to consider at least the end of line
    conventions on each system. (I've no experience with Mac, but
    from what I've seen, most Windows programs, and the libraries
    delivered with VC++, can handle files with Unix line endings;
    the reverse is NOT true, and Windows line endings can cause
    problems when read under Unix.)

    --
    James Kanze (GABI Software) email:
    Conseils en informatique orientée objet/
    Beratung in objektorientierter Datenverarbeitung
    9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34
     
    James Kanze, May 7, 2009
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. ALuPin
    Replies:
    1
    Views:
    509
    Ken Smith
    Oct 8, 2004
  2. phil hunt
    Replies:
    0
    Views:
    312
    phil hunt
    Jan 23, 2004
  3. Replies:
    1
    Views:
    284
    Fredrik Lundh
    Dec 14, 2004
  4. bahoo

    recursively archiving files

    bahoo, Apr 9, 2007, in forum: Python
    Replies:
    1
    Views:
    230
    Larry Bates
    Apr 9, 2007
  5. Guest
    Replies:
    5
    Views:
    322
    Walter Wang [MSFT]
    Aug 27, 2007
Loading...

Share This Page