[Scummvm-devel] GZip savegames
Max Horn
max at quendi.de
Mon Dec 1 10:52:19 CET 2003
Yo,
as you may have noticed, I recently commited code which allows for
storing savegames compressed. Engines which use SaveFileManager (and
all engines should do that... I hope all do it, indeed :-) get the
ability for free. All you have to do is to define USE_ZLIB when
compiling ScummVM (and of course you need to have zlib, and link
against it, i.e. on Unix add a -lz). Old uncompressed savegames can
still be loaded. New savegames (for scumm) are typically reduced by a
factor 2-7 in my tests.
Note:
* zlib is very well tested and has very good performance (including low
memory usage)
* zlib is portable to almost everything out there, I dare to say to far
more systems than ScummVM runs on at this time
* going "back" wouldn't be a problem: if you want to send a compressed
savegame to somebody with a ScummVM w/o compression support, just use
"gunzip" to decompress the savegame
* speed is no issue. Memory shouldn't be an issue either
Personally, I think we should make zlib a requirement for compiling
ScummVM, and just always use it. This way, nobody should ever have to
manually decompress savegames. And virtually every Unix comes with zlib
pre-installed.
In the meantime, anybody can try out the code as described above
Cheers,
Max
More information about the Scummvm-devel
mailing list