Closed lucmaga closed 2 years ago
According to zlib.h, Z_BUF_ERROR should be returned when no progress was made. The same should be returned if flush is Z_FINISH and the inflate could not be done at once.
This fixes issue #74.
Signed-off-by: Lucas A. M. Magalhaes lamm@linux.ibm.com
@lucmaga I think this kind of patch deserves a new test that validates if the library returns Z_BUF_ERROR for expected inputs and fail if it doesn't.
Z_BUF_ERROR
Agreed @tuliom I will some add tests to this pr.
According to zlib.h, Z_BUF_ERROR should be returned when no progress was made. The same should be returned if flush is Z_FINISH and the inflate could not be done at once.
This fixes issue #74.
Signed-off-by: Lucas A. M. Magalhaes lamm@linux.ibm.com