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


##########
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:
   I think I will do:
   `//loop until all input bytes are readen
   while(read_input_bytes < input_length)
   ...
   // inflate 1 gzip member each loop iteration
   inflate(...)
   `
   
   what do you think?
   



##########
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:
   I think I will do:
   `//loop until all input bytes are readen
   
   while(read_input_bytes < input_length)
   
   ...
   
   // inflate 1 gzip member each loop iteration
   
   inflate(...)
   `
   
   what do you think?
   



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