[Kde-games-devel] Create file archives with Qt/kdelibs

Andreas Beckermann b_mann at gmx.de
Fri May 16 01:24:12 CEST 2008


On Thursday 15 May 2008, Stefan Majewsky wrote:
> Am Donnerstag 15 Mai 2008 23:27:29 schrieb Andreas Pakulat:
> > If we're talking about code, then there's KArchive and its subclasses in
> > kdelibs. You can read and write from/to tar.bz2, tar.gz, .zip and even
> > .ar in case you need that. Its all in kdelibs/kio, api docs are here:
> > http://api.kde.org/4.x-api/kdelibs-apidocs/kio/html/classKArchive.html
>
> Thank you for the hint. I already scanned the apidocs but seem to have
> missed it.
>
> Stefan

Hi
I second that recommendation of KArchive for this kind of thing.
We've been using KTar in Boson for our file format(s) for ages, see
http://boson.svn.sourceforge.net/viewvc/boson/branches/qt4/code/boson/gameengine/bofile.h?revision=8016&view=markup
for sample use. Note however that the API changed slightly in KDE4 and this is 
only a quick port.

There's a huge advantage that comes with using .tar.gz files: not only can you 
easily write code to read them, but you also can untar them manually whenever 
you need to, which comes in very handy occasionally.

CU
Andi


More information about the kde-games-devel mailing list