Results 1 to 2 of 2

Thread: Dealing with bzip2 compressed tar files

  1. #1
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    258
    Thanks
    22
    Thanked 19 Times in 16 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Dealing with bzip2 compressed tar files

    Hi,
    I would like to have bzipped tarballs that are read by the appilcation without the need for extracting them. The Idea behind this is that I want to achieve a means for easily changing the applictions theme. The theme should be a simple tarball compressed in bzip|gzip with an xml-file that contains information about the theme (author, inlcuded files, creation date ...), preview-images and last but not least the css file itself. The information should then be extracted on the fly and shown to the user. Right now I am reading libbzip2's documentation. AFAIK Bzip2 only operates on files and not directories so I assume I would end up with a tarball after decompressing. If there is another/simpler (and portable since the app is supposed to run on all platforms supported by Qt ...) way to do this
    (for example using zip) I would most probably do that. Any Ideas?

    Thanx

  2. #2
    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: Dealing with bzip2 compressed tar files

    You can use libbzip2 to decompress the archive and then either untar it manually (tar simply concatenates files probably adding some headers) or use a library that can untar. There is nothing unportable here - I'm sure libbzip2 is available on many platforms. libzip is also an option, but it won't decompress bz2 files, only zips (and again you have to have the library on all platforms you want to support).

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.