diff options
| author | ljfa <ljfa-ag@web.de> | 2015-09-21 08:30:25 +0200 |
|---|---|---|
| committer | ljfa <ljfa-ag@web.de> | 2015-09-21 08:33:16 +0200 |
| commit | 64e6d2abc719869e386caa760bfbe1e65bd7559b (patch) | |
| tree | f666d9f05a11058e31703879f07e297ef40b1f86 /include/io/ozlibstream.h | |
| parent | 07a9300246630705d5f4e6978cdc5cf8a8b4afd7 (diff) | |
| download | Project-Tick-64e6d2abc719869e386caa760bfbe1e65bd7559b.tar.gz Project-Tick-64e6d2abc719869e386caa760bfbe1e65bd7559b.zip | |
Create ozlibstream::close method
Set failbit on output stream on failure
Diffstat (limited to 'include/io/ozlibstream.h')
| -rw-r--r-- | include/io/ozlibstream.h | 4 |
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; }; |
