summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Compress/ZLibDecompressor.cpp')
-rw-r--r--Swiften/Compress/ZLibDecompressor.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/Swiften/Compress/ZLibDecompressor.cpp b/Swiften/Compress/ZLibDecompressor.cpp
index ab954f4..f5df9fe 100644
--- a/Swiften/Compress/ZLibDecompressor.cpp
+++ b/Swiften/Compress/ZLibDecompressor.cpp
@@ -6,16 +6,27 @@
#include <Swiften/Compress/ZLibDecompressor.h>
+#include <zlib.h>
#include <cassert>
+#include <Swiften/Compress/ZLibCodecompressor_Private.h>
+
#pragma GCC diagnostic ignored "-Wold-style-cast"
namespace Swift {
ZLibDecompressor::ZLibDecompressor() {
- int result = inflateInit(&stream_);
+ int result = inflateInit(&p->stream);
assert(result == Z_OK);
(void) result;
}
+ZLibDecompressor::~ZLibDecompressor() {
+ inflateEnd(&p->stream);
+}
+
+int ZLibDecompressor::processZStream() {
+ return inflate(&p->stream, Z_SYNC_FLUSH);
+}
+
}