summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorljfa <ljfa-ag@web.de>2015-09-21 08:30:25 +0200
committerljfa <ljfa-ag@web.de>2015-09-21 08:33:16 +0200
commit64e6d2abc719869e386caa760bfbe1e65bd7559b (patch)
treef666d9f05a11058e31703879f07e297ef40b1f86 /include
parent07a9300246630705d5f4e6978cdc5cf8a8b4afd7 (diff)
downloadProject-Tick-64e6d2abc719869e386caa760bfbe1e65bd7559b.tar.gz
Project-Tick-64e6d2abc719869e386caa760bfbe1e65bd7559b.zip
Create ozlibstream::close method
Set failbit on output stream on failure
Diffstat (limited to 'include')
-rw-r--r--include/io/ozlibstream.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/io/ozlibstream.h b/include/io/ozlibstream.h
index d4ea8c2840..770db0029d 100644
--- a/include/io/ozlibstream.h
+++ b/include/io/ozlibstream.h
@@ -48,6 +48,8 @@ public:
std::ostream& get_ostr() const { return os; }
+ ///Finishes compression and writes all pending data to the output
+ void close();
private:
std::ostream& os;
std::vector<char> in;
@@ -84,6 +86,8 @@ public:
///@return the wrapped ostream
std::ostream& get_ostr() const { return buf.get_ostr(); }
+ ///Finishes compression and writes all pending data to the output
+ void close() { buf.close(); }
private:
deflate_streambuf buf;
};