lidavidm commented on a change in pull request #9680:
URL: https://github.com/apache/arrow/pull/9680#discussion_r594370101



##########
File path: cpp/src/arrow/util/compression_zlib.cc
##########
@@ -246,7 +246,7 @@ class GZipCompressor : public Compressor {
     //  again with the same value of the flush parameter and more output space
     //  (updated avail_out), until the flush is complete (deflate returns
     //  with non-zero avail_out)."
-    return FlushResult{bytes_written, (bytes_written == 0)};
+    return FlushResult{bytes_written, (ret == Z_BUF_ERROR && stream_.avail_out 
== 0)};

Review comment:
       Hmm, that makes the new test fail again. Reading that more carefully, it 
sounds like Z_BUF_ERROR without `avail_out == 0` is just zlib's way to indicate 
that there was no input to compress, since it states 
   > can be called again with **more input** and more output space




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to