[zlib_bench] check deflate consumed all input

zlib_compress deflate() should consume all the input data. Add a check
and fail the deflation if there is unconsumed input data when the zlib deflate() call returns.

What about inflate()? zlib_bench knows the expected length of the data
(it is the original input length) and fails with a Z_DATA_ERROR if the zlib_uncompress inflate() output data length does not match.

Bug: 798943
Change-Id: Ibdc9752754a52343ea6139ce9cc5a99c2a0a57a7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3630105
Auto-Submit: Noel Gordon <noel@chromium.org>
Reviewed-by: Chris Blume <cblume@chromium.org>
Commit-Queue: Chris Blume <cblume@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1003565}
NOKEYCHECK=True
GitOrigin-RevId: 4cc4f4c0086c2e5ad52bff6be7e2430b72ebcba9
1 file changed