views:

201

answers:

1

Hello,

I have a program that links in zlib v1.2.3 and it got the following error:

deflateEnd error 'no msg' kind: 'Z_DATA_ERROR': -3

The program has work successfully with lots of different files to be compressed.

Does anyone know what the 'no msg' of kind Z_DATA_ERROR means and how one would go about debugging it?

Thanks.

-William

A: 

This means that deflateEnd() was incorrectly called before deflate() had been called enough times to consume all the input or produce all the output. Solution is to figure out why the program did not keep calling deflate() sufficient times. In my case, it was a fencepost error and the final calls to deflate() that specify to flush any remaining output and finish consuming all the input were dropped.

WilliamKF