joosthooz commented on a change in pull request #11810: URL: https://github.com/apache/arrow/pull/11810#discussion_r759486094
########## File path: cpp/src/arrow/util/compression_lz4.cc ########## @@ -234,14 +242,21 @@ class LZ4Compressor : public Compressor { LZ4F_compressionContext_t ctx_ = nullptr; LZ4F_preferences_t prefs_; bool first_time_; + + private: + int compression_level_; }; // ---------------------------------------------------------------------- // Lz4 frame codec implementation class Lz4FrameCodec : public Codec { public: - Lz4FrameCodec() : prefs_(DefaultPreferences()) {} + Lz4FrameCodec(int compression_level) + : compression_level_(compression_level == kUseDefaultCompressionLevel + ? kLZ4DefaultCompressionLevel + : compression_level), + prefs_(DefaultPreferences(compression_level)) {} Review comment: Ok changed, thanks -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org