Use compression when saving as a .sifz file.
authordooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Mon, 17 Sep 2007 17:59:01 +0000 (17:59 +0000)
committerdooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Mon, 17 Sep 2007 17:59:01 +0000 (17:59 +0000)
git-svn-id: http://svn.voria.com/code@694 1f10aa63-cdf2-0310-b900-c93c546f37ac

synfig-core/trunk/src/synfig/savecanvas.cpp

index bff17b0..8988a50 100644 (file)
 #include "gradient.h"
 #include <errno.h>
 
+extern "C" {
+#include <libxml/tree.h>
+}
+
 #endif
 
 /* === U S I N G =========================================================== */
@@ -747,6 +751,11 @@ synfig::save_canvas(const String &filename, Canvas::ConstHandle canvas)
 
        synfig::String tmp_filename(filename+".TMP");
 
+       if (String(filename.begin() + filename.find_last_of('.')+1, filename.end()) == "sifz")
+               xmlSetCompressMode(9);
+       else
+               xmlSetCompressMode(0);
+
        try
        {
                assert(canvas);