From 76dcc4a9d1c44f7078780dea2756dff3a75d234f Mon Sep 17 00:00:00 2001 From: ljfa Date: Mon, 21 Sep 2015 13:26:04 +0200 Subject: Create zlib_streambuf base class --- src/io/izlibstream.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/io/izlibstream.cpp') diff --git a/src/io/izlibstream.cpp b/src/io/izlibstream.cpp index 6b7a75189a..85e04a189a 100644 --- a/src/io/izlibstream.cpp +++ b/src/io/izlibstream.cpp @@ -18,17 +18,14 @@ * along with libnbt++. If not, see . */ #include "io/izlibstream.h" -#include "io/zlib_error.h" +#include "io/zlib_streambuf.h" namespace zlib { inflate_streambuf::inflate_streambuf(std::istream& input, size_t bufsize, int window_bits): - is(input), in(bufsize), out(bufsize), stream_end(false) + zlib_streambuf(bufsize), is(input), stream_end(false) { - zstr.zalloc = Z_NULL; - zstr.zfree = Z_NULL; - zstr.opaque = Z_NULL; zstr.next_in = Z_NULL; zstr.avail_in = 0; int ret = inflateInit2(&zstr, window_bits); -- cgit 0.0.5-2-1-g0f52