Complete.Org: Mailing Lists: Archives: freeciv-dev: July 2000:
[Freeciv-Dev] Re: patch: zlib support (PR#366)
Home

[Freeciv-Dev] Re: patch: zlib support (PR#366)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx, bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: patch: zlib support (PR#366)
From: David Pfitzner <dwp@xxxxxxxxxxxxxx>
Date: Wed, 12 Jul 2000 00:51:25 +1000 (EST)

Here is another attempt at adding zlib support, for transparent 
compression/uncompression of savegames.  For previous discussion 
see: http://www.freeciv.org/cgi-bin/bugs?findid=366
(and related thread on freeciv-dev at that time).

The attached patch should address most of the issues raised last 
time.  In particular, Jeff Mallatt wrote:

> This simply doesn't compile on my machine!  My zlib.h doesn't say anything
> about a function called gzgets(). 

Should be fixed: configure now checks for gzgets in -lz.

> Perhaps, if the library/header exist, always compile with compression
> capability unless --without-zlib was specified.  Silently disable if not
> found and --with-zlib not specified.  Abort with message if not found and
> --with-zlib specified.

Done.

> Then, add a server option (compsave?) 0..9, where 0 means no compression
> (simple text, like now, and no ".gz" extension).  This way we can choose
> what default we like, without it being an unchangeable configure-time
> decision.

Done (option called "compress").

Another point raised previously was possibility of using bzip2, or just 
being able to call an external program to do the compression work.  This 
patch doesn't do either of these, but it does implement a framework (new 
module common/ioz.h) which should be not too hard to extend to these if 
someone wants to.

Regards,
-- David

Attachment: zlib2c.diff.gz
Description: GNU Zip compressed data


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