Github user majetideepak commented on a diff in the pull request: https://github.com/apache/orc/pull/122#discussion_r117360126 --- Diff: c++/src/Compression.cc --- @@ -636,6 +884,33 @@ DIAGNOSTIC_POP return static_cast<uint64_t>(result); } + std::unique_ptr<BufferedOutputStream> + createCompressor( + CompressionKind kind, + OutputStream * outStream, + CompressionStrategy strategy, + uint64_t bufferCapacity, + uint64_t blockSize, + MemoryPool& pool) { + switch (static_cast<int64_t>(kind)) { + case CompressionKind_NONE: { + return std::unique_ptr<BufferedOutputStream> + (new BufferedOutputStream(pool, outStream, bufferCapacity, blockSize)); + } + case CompressionKind_ZLIB: { + int level = strategy == CompressionStrategy_SPEED ? 1 : 9; --- End diff -- We should keep the default level to `Z_DEFAULT_COMPRESSION` (-1). Only if `strategy` is specified, we must set accordingly. I think the Java code does something similar.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---