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


##########
cpp/src/arrow/util/compression_zlib.cc:
##########
@@ -392,37 +395,44 @@ 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
+    //inflate until reading all input data
+    while(input_bytes_readen < input_length) {

Review Comment:
   ```suggestion
       // inflate() will not automatically decode concatenated gzip members, 
keep calling
       // inflate until reading all input data
       while (read_input_bytes < input_length) {
   ```



##########
cpp/src/arrow/util/compression_zlib.cc:
##########
@@ -381,6 +381,9 @@ class GZipCodec : public Codec {
 
   Result<int64_t> Decompress(int64_t input_length, const uint8_t* input,
                              int64_t output_buffer_length, uint8_t* output) 
override {
+    int64_t input_bytes_readen = 0;

Review Comment:
   ```suggestion
       int64_t read_input_bytes = 0;
   ```



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