diff options
author | Yuri Gorshenin <y@maps.me> | 2017-01-30 13:18:08 +0300 |
---|---|---|
committer | Yuri Gorshenin <y@maps.me> | 2017-01-30 14:06:54 +0300 |
commit | 39b800ec8655d443b23b5ec1c05f47dd1771f770 (patch) | |
tree | 6e343afd50df72ed15bf6728a7757e5be6668496 /coding/zlib.cpp | |
parent | c0a9fbc742d200e447670d89cd5067d14f8e9d9a (diff) |
[coding] Fixed ZLib wrappers.
Diffstat (limited to 'coding/zlib.cpp')
-rw-r--r-- | coding/zlib.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/coding/zlib.cpp b/coding/zlib.cpp index f54cc574b4..2d40bbcebe 100644 --- a/coding/zlib.cpp +++ b/coding/zlib.cpp @@ -57,6 +57,14 @@ ZLib::DeflateProcessor::DeflateProcessor(void const * data, size_t size, ZLib::L ZLib::DeflateProcessor::~DeflateProcessor() noexcept { + unsigned bytes = 0; + int bits = 0; + int const ret = deflatePending(&m_stream, &bytes, &bits); + UNUSED_VALUE(ret); + ASSERT_EQUAL(ret, Z_OK, ("")); + ASSERT_EQUAL(bytes, 0, ("Some bytes were not flushed:", bytes)); + ASSERT_EQUAL(bits, 0, ("Some bits were not flushed:", bits)); + if (m_init) deflateEnd(&m_stream); } |