This commit is contained in:
ldcsaa 2022-01-17 00:07:28 +08:00
parent 47fa15bd7a
commit 613b422ba0

View File

@ -1533,6 +1533,8 @@ CHPZlibCompressor::CHPZlibCompressor(Fn_CompressDataCallback fnCallback, int iWi
{
ASSERT(m_fnCallback != nullptr);
::ZeroObject(m_Stream);
m_bValid = (::deflateInit2(&m_Stream, iLevel, iMethod, iWindowBits, iMemLevel, iStrategy) == Z_OK);
}
CHPZlibCompressor::~CHPZlibCompressor()
@ -1609,6 +1611,8 @@ CHPZlibDecompressor::CHPZlibDecompressor(Fn_DecompressDataCallback fnCallback, i
{
ASSERT(m_fnCallback != nullptr);
::ZeroObject(m_Stream);
m_bValid = (::inflateInit2(&m_Stream, iWindowBits) == Z_OK);
}
CHPZlibDecompressor::~CHPZlibDecompressor()