From 5120eddb540a2812f1a8be7184fef3a78387781d Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sun, 30 Nov 2003 00:43:01 +0000 Subject: zlib compression works *very* well, factor 3-6 in my test cases. Personally I'd make zlib support the default... svn-id: r11435 --- common/savefile.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/common/savefile.cpp b/common/savefile.cpp index 1e2725f98f..01185b6527 100644 --- a/common/savefile.cpp +++ b/common/savefile.cpp @@ -25,6 +25,10 @@ // FIXME HACK +// Enable this to activate transparent zlib compression of all savegames +// Note that doing that makes ScummVM produce savegames which can't trivially +// be read by non-zlib enabled versions. However, one can always decompress +// such a savegame by using gzip, so this shouldn't be a bad problem. //#define USE_ZLIB @@ -184,5 +188,9 @@ void SaveFileManager::join_paths(const char *filename, const char *directory, } SaveFile *SaveFileManager::makeSaveFile(const char *filename, bool saveOrLoad) { +#ifdef USE_ZLIB + return new GzipSaveFile(filename, saveOrLoad); +#else return new StdioSaveFile(filename, saveOrLoad); +#endif } -- cgit v1.2.3