Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2001:
[Freeciv-Dev] Re: loading compressed XPM files
Home

[Freeciv-Dev] Re: loading compressed XPM files

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Benoit Hudson <bh@xxxxxxxxxxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: loading compressed XPM files
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 17 Sep 2001 10:16:49 +0200
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Sun, Sep 16, 2001 at 06:22:24PM -0400, Benoit Hudson wrote:
> Compressing the XPM files in the rulesets using gzip reduces the size of
> the freeciv-1.12.0 share directory by about 75% (1.6 rather than 6.4 Mb).
> This patch, applied to the gui-gtk client (client/gui-gtk/graphics.c) from
> the released 1.12.0, lets the GTK client read gzipped XPM files.  Apply the
> patch, install as usual, then go to share/freeciv and:
>         gzip -9 `find . -name \*.xpm`
> 
> Ideally, the makefile would do that automagically.
> 
> The patch checks for HAVE_LIBZ ; if you don't have it, this patch only has
> the effect of copying and freeing an additional string (because gdk takes a
> char*, and I'm paranoid about passing const char* in where char* is
> required).  Obviously, if you don't have it, you also can't read
> compressed xmp.
> 
> The patch hooks into the mechanism that already existed to first try one
> filetype, and if it doesn't work, try another.  So if there's no compressed
> xpm file, we use a non-compressed one.
> 
> TODO 1: have the makefile automatically gzip the xpm files
> TODO 2: extend this to work with all clients
> TODO 3: extend this to have all the share files be gzipped.  The marginal
>         benefit of that is much less, but we still save 40% (600 Kb).

So the user is lost if freeciv is shipped with compressed xpms and the
user doesn't have libz?! We have to make libz a prerequisite.

During the software distribute period (ftp server as a tar.gz) the
software is compressed. Your change will only save space on a local
installation. Hard-disks are cheap. You can use something like
compressed ext2. You can also remove unwanted files by hand.

Summary: I don't think this is a good idea.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 A life? Cool! Where can I download one?


[Prev in Thread] Current Thread [Next in Thread]