mapleFU commented on code in PR #38272:
URL: https://github.com/apache/arrow/pull/38272#discussion_r1398675808


##########
cpp/src/arrow/util/compression_zlib.cc:
##########
@@ -392,40 +395,48 @@ class GZipCodec : public Codec {
       return 0;
     }
 
-    // Reset the stream for this block
-    if (inflateReset(&stream_) != Z_OK) {
-      return ZlibErrorPrefix("zlib inflateReset failed: ", stream_.msg);
-    }
+    // inflate() will not automatically decode concatenated gzip members, keep 
calling

Review Comment:
   ```
   loop {
     inflateReset
     loop {
       inflate
     }
   }
   ```
   
   Seems we'd better separate comment `inflateReset` and `inflate` around there 
code? And the `inflate` logic is unchanged here( it might call `inflate` 
multiple times before ). So I didn't know why the comment is here...
   
   My wording is wrong here, it's `inflateReset` rather than `inflateInit`, 
sorry for that.



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

To unsubscribe, e-mail: [email protected]

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

Reply via email to