--- zlib.cpp 2014-02-26 16:16:12.664141000 -0500 +++ zlib_new.cpp 2015-06-05 08:24:10.181878064 -0400 @@ -122,6 +122,8 @@ static_cast(next_out - dest_begin); if (length > 0) crc_ = crc_imp_ = crc32(crc_imp_, buf, length); + else + crc_ = crc_imp_ = 0; } total_in_ = s->total_in; total_out_ = s->total_out;