orc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From majetideepak <...@git.apache.org>
Subject [GitHub] orc pull request #122: ORC-192 Implement zlib compresion stream
Date Sun, 21 May 2017 12:16:55 GMT
Github user majetideepak commented on a diff in the pull request:

    https://github.com/apache/orc/pull/122#discussion_r117631322
  
    --- 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 --
    
    You can see the compression levels here
    http://www.zlib.net/manual.html
    ```
    #define Z_NO_COMPRESSION         0
    #define Z_BEST_SPEED             1
    #define Z_BEST_COMPRESSION       9
    #define Z_DEFAULT_COMPRESSION  (-1)
    ```


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message