| 31 | } |
| 32 | |
| 33 | std::unique_ptr<RleEncoder> createRleEncoder(std::unique_ptr<BufferedOutputStream> output, |
| 34 | bool isSigned, RleVersion version, MemoryPool&, |
| 35 | bool alignedBitpacking) { |
| 36 | switch (static_cast<int64_t>(version)) { |
| 37 | case RleVersion_1: |
| 38 | return std::make_unique<RleEncoderV1>(std::move(output), isSigned); |
| 39 | case RleVersion_2: |
| 40 | return std::make_unique<RleEncoderV2>(std::move(output), isSigned, alignedBitpacking); |
| 41 | default: |
| 42 | throw NotImplementedYet("Not implemented yet"); |
| 43 | } |
| 44 | } |
| 45 | |
| 46 | std::unique_ptr<RleDecoder> createRleDecoder(std::unique_ptr<SeekableInputStream> input, |
| 47 | bool isSigned, RleVersion version, MemoryPool& pool, |