]> git.tdb.fi Git - libs/datafile.git/blob - source/output.cpp
Use size_t for memory buffer sizes
[libs/datafile.git] / source / output.cpp
1 #include <msp/io/zlibcompressed.h>
2 #include "output.h"
3
4 using namespace std;
5
6 namespace Msp {
7 namespace DataFile {
8
9 Output::Output(IO::Base &o):
10         out(&o)
11 { }
12
13 Output::~Output()
14 {
15         delete compressed;
16 }
17
18 void Output::set_compressed()
19 {
20         compressed = new IO::ZlibCompressed(*out, IO::M_WRITE);
21         out = compressed;
22 }
23
24 size_t Output::put(char c)
25 {
26         return out->put(c);
27 }
28
29 size_t Output::write(const string &s)
30 {
31         return out->write(s);
32 }
33
34 } // namespace DataFile
35 } // namespace Msp