MCPcopy Create free account
hub / github.com/apache/arrow / MaxCompressedLen

Method MaxCompressedLen

cpp/src/arrow/util/compression_zlib.cc:450–461  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

448 }
449
450 int64_t MaxCompressedLen(int64_t input_length,
451 const uint8_t* ARROW_ARG_UNUSED(input)) override {
452 // Must be in compression mode
453 if (!compressor_initialized_) {
454 Status s = InitCompressor();
455 ARROW_CHECK_OK(s);
456 }
457 int64_t max_len = deflateBound(&stream_, static_cast<uLong>(input_length));
458 // ARROW-3514: return a more pessimistic estimate to account for bugs
459 // in old zlib versions.
460 return max_len + 12;
461 }
462
463 Result<int64_t> Compress(int64_t input_length, const uint8_t* input,
464 int64_t output_buffer_len, uint8_t* output) override {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected