Add my copyright to files I've modified.
[synfig.git] / synfig-core / trunk / src / synfig / savecanvas.cpp
index bff17b0..4f37a25 100644 (file)
@@ -6,6 +6,7 @@
 **
 **     \legal
 **     Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
+**     Copyright (c) 2007 Chris Moore
 **
 **     This package is free software; you can redistribute it and/or
 **     modify it under the terms of the GNU General Public License as
 #include "gradient.h"
 #include <errno.h>
 
+extern "C" {
+#include <libxml/tree.h>
+}
+
 #endif
 
 /* === U S I N G =========================================================== */
@@ -747,6 +752,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);