]> git.tdb.fi Git - libs/datafile.git/blobdiff - source/output.cpp
Remove the loaded flag from PackSource files
[libs/datafile.git] / source / output.cpp
index 62886d3d2971191881867092ceb4f371629d4b7c..2d33810b5b86d720db9ec437d689ff4e3c57a554 100644 (file)
@@ -1,3 +1,4 @@
+#include <msp/io/zlibcompressed.h>
 #include "output.h"
 
 using namespace std;
@@ -6,9 +7,21 @@ namespace Msp {
 namespace DataFile {
 
 Output::Output(IO::Base &o):
-       out(&o)
+       out(&o),
+       compressed(0)
 { }
 
+Output::~Output()
+{
+       delete compressed;
+}
+
+void Output::set_compressed()
+{
+       compressed = new IO::ZlibCompressed(*out, IO::M_WRITE);
+       out = compressed;
+}
+
 unsigned Output::put(char c)
 {
        return out->put(c);