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

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

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Cc: bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] patch: zlib support (PR#366)
From: David Pfitzner <dwp@xxxxxxxxxxxxxx>
Date: Sat, 6 May 2000 18:42:03 -0700 (PDT)

In a previous age, Markus Linnala <maage@xxxxxxxxx> submitted a
patch (http://arch.freeciv.org/x-OLD-freeciv-dev-199809/msg00264.html)
which included:

** --with-zlib             use zlib (allows compressed savegames) 
   --with-zlib freeciv links against zlib (libz.a) and compresses
   every game it saves. You can uncompress them with gzip. It silently
   opens also uncompressed games. Compressed games have postfix '.gz'.
   Saved games are lot smaller. Compression ratio is about 1:6.

For various reasons, that part of the patch never made it into the 
main distribution, but now that savegames have become significantly
larger due to full fog of war, I though it might be worthwhile to
revisit zlib support.

The attached patch is based on Markus Linnala's patch, extracted from
the other parts of that patch, updated to CVS, and with some changes
by me.  Comments:

- It is only enabled if configure with --with-zlib; it is unclear
  to me whether it should automatically happen if configure finds
  zlib is available: there is a time-space tradeoff when loading
  and saving, and in some cases compressed files may be less
  convenient?

- It may be nice to also have a server option which controls the
  compression level, and can also be used to turn compression
  off even when compile with zlib, but the patch does not include
  that.

Regards,
-- David

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


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