diff options
author | Remko Tronçon <git@el-tramo.be> | 2012-07-15 07:07:53 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2012-07-15 07:07:53 (GMT) |
commit | 7a591138e89ad71ee1dd9825d7705c94f9bb50d2 (patch) | |
tree | 25b9832b234d498ff359ee6d60758004a3232278 /Swiften/Compress/ZLibDecompressor.cpp | |
parent | fbe2f40509da8c6c25d07de18ded3c0e3194ef6b (diff) | |
download | swift-contrib-7a591138e89ad71ee1dd9825d7705c94f9bb50d2.zip swift-contrib-7a591138e89ad71ee1dd9825d7705c94f9bb50d2.tar.bz2 |
Hide ZLib implementation.
Diffstat (limited to 'Swiften/Compress/ZLibDecompressor.cpp')
-rw-r--r-- | Swiften/Compress/ZLibDecompressor.cpp | 13 |
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); +} + } |