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



##########
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:
       Z_BUF_ERROR shouldn't pass silently, though. So either it should return 
`should_retry = true` or it should return an error.
   According to the `deflate()` documentation:
   > Note that Z_BUF_ERROR is not fatal, and deflate() can be called again with 
more input and more output space to continue compressing. 




----------------------------------------------------------------
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