pitrou commented on code in PR #15194:
URL: https://github.com/apache/arrow/pull/15194#discussion_r1072039876


##########
cpp/src/arrow/ipc/options.h:
##########
@@ -67,6 +67,15 @@ struct ARROW_EXPORT IpcWriteOptions {
   /// May only be UNCOMPRESSED, LZ4_FRAME and ZSTD.
   std::shared_ptr<util::Codec> codec;
 
+  /// @brief Always use compression, regardless of the resulting output size
+  ///
+  /// If false, compression will be skipped for body buffers where the 
expected compressed
+  /// size matches/exceeds the uncompressed size. Otherwise, compression will 
be applied
+  /// indiscriminately. This option is ignored if no codec was supplied.
+  ///
+  /// This is true by default due to backwards-compatibility concerns.
+  bool compress_always = true;

Review Comment:
   Of course, we don't have to implement an advanced strategy here. However, we 
must make an API choice and I think it's better to be forward-looking (and 
implement the heuristic in the most simplistic way, for now).



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