[Kde-games-devel] [OT] Tar (was: Re: Game introduction: Nonogram)

Burkhard Lehner burkhard.lehner at googlemail.com
Wed May 14 10:11:58 CEST 2008


Hi,

again 2 Euro-cent from me :-)

If I understood Tom correctly, there is only one file per tar-file. Is this
correct?
In this case, I don't think tar makes any sense, because it was build to
store a collection of files for backup.
If it is about compression, using gzip or bzip2 would be enough. Since it
would also reduce the overhead of tar, the files were even smaller, and I
think there is no version problem with gzip and bzip2: They are identical on
nearly any system (if installed, which is the case for nearly every Unix
derivate, including Linux, but not necessarily on Windows or Max OS X).
Maybe there is even a library interface for gzip or bzip2, so that calling
an external program is not necessary at all.

And another question to Tom:
You are using xpm files for the levels? This is perfectly the choice if you
want to integrate the levels into your code (since xpm is indeed compilable
C code), but since you seem to load them dynamically, I would suggest using
PNG.

Cheers,
Burkhard

2008/5/14 Christian Ehrlicher <Ch.Ehrlicher at gmx.de>:

> > Von: "Tom Vollerthun"
> > Hi Ian,
> >
> > I'm glad you pointed out the problems with tar-files. I think I will go
> > back to subdirectories with plain files. But that _will_ result in one
> file
> > per level, since I (currently) use image files (p.e. xbm) as game data.
> I
> > don't really care about that, but since you said I wouldn't want it:
> what's
> > the downside of having three hundret small files instead of one large
> > (except of using more I-Nodes in the file system and causing a small
> amount of
> > fragmentation) ?
> >
> I wrote a small QIODevice-Wrapper for tar which can read and write files
> from/to tar files. It can be found here:
> http://websvn.kde.org/trunk/kdesupport/kdewin-installer/3rdparty/filters/
>
> We use it in our kdewin-installer to unpack .tar.bz2 and it works fine. I
> must say that this class only a small subset of tar - it can read tar files
> created by linux tar but don't know about others (imho there are more than
> five slightly different tar formats). But this can be fixed if needed.
>
>
> Christian
> --
> 249 Spiele für nur 1 Preis. Die GMX Spieleflatrate schon ab 9,90 Euro.
> Neu: Asterix bei den Olympischen Spielen: http://flat.games.gmx.de
> _______________________________________________
> kde-games-devel mailing list
> kde-games-devel at kde.org
> https://mail.kde.org/mailman/listinfo/kde-games-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kde-games-devel/attachments/20080514/25be64eb/attachment-0001.html 


More information about the kde-games-devel mailing list