Results 1 to 3 of 3

Thread: File packaging question

  1. #1
    Join Date
    May 2007
    Posts
    6
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Question File packaging question

    Hi all,

    I'm currently writing an application that uses a combination of binary and XML files to describe it's data. The problem I'm facing now is that I would like to pack all these files into a single one so that users can easily transfer them.

    I've been looking at multiple options :
    - tar file;
    - uncompressed zip file (like docx files, pk3, etc);
    - home made format.

    Any of you using these kind of files in your application ?
    If so, what library are you using ? What would you suggest ?
    I'd like to be able to read the files inside the archive without extracting them to a temporary file (for example, the binary part could be several hundreds of Mbytes, so extracting it would be too long...).

    Note that I don't want/need to compress the files, speed is really important here so compressing/decompressing is out of the question.

    Thanks !

    Marc

  2. #2
    Join Date
    May 2006
    Posts
    788
    Thanks
    49
    Thanked 48 Times in 46 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: File packaging question

    Quote Originally Posted by Bookmarc View Post
    Hi all,

    I'm currently writing an application that uses a combination of binary and XML files to describe it's data. The problem I'm facing now is that I would like to pack all these files into a single one so that users can easily transfer them.

    Marc
    Have a look on openoffice format...

    http://ciz.ch/it/software/content_ma..._14069000.html

    Rename document.sxw to document.zip and open it... :-)




    Or show My apache fop file editor on http://www.qt-apps.org/content/show....?content=67552

    Sample ....
    http://fop-miniscribus.googlecode.co...stDocument.fop
    image are inline xml as SVG

    zip on qt http://quazip.sourceforge.net/ only Gnu compiler maybe http://www.libqxt.org/page/index planing to make its run to all compiler...

  3. #3
    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: File packaging question

    If you don't want to extract before reading then tar might be a good idea. Otherwise I suggest you use a home made format similar to what tar does - just concatenate the files adding some headers to denote offsets and sizes of each file within the archive. You can also embed the files into your application binary using Qt resource system but it will then make those files readonly and they will be occupying memory even if you don't use them.

Similar Threads

  1. Set up the Qt4.3.2 with Visual Studio 2005
    By lamoda in forum Installation and Deployment
    Replies: 6
    Last Post: 30th January 2008, 06:51
  2. Replies: 2
    Last Post: 8th November 2007, 20:15
  3. file renaming on windows
    By jdd81 in forum Qt Programming
    Replies: 9
    Last Post: 2nd October 2007, 19:41
  4. qt-3.3.8 fail in scratchbox
    By nass in forum Installation and Deployment
    Replies: 0
    Last Post: 25th May 2007, 15:21
  5. Sending Binary File with QFTP
    By nbkhwjm in forum Newbie
    Replies: 2
    Last Post: 7th March 2007, 18:10

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.