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

Method InitDecompressor

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

Source from the content-addressed store, hash-verified

369 }
370
371 Status InitDecompressor() {
372 EndCompressor();
373 memset(&stream_, 0, sizeof(stream_));
374 int ret;
375
376 // Initialize to run either deflate or zlib/gzip format
377 int window_bits = DecompressionWindowBitsForFormat(format_, window_bits_);
378 if ((ret = inflateInit2(&stream_, window_bits)) != Z_OK) {
379 return ZlibErrorPrefix("zlib inflateInit failed: ", stream_.msg);
380 }
381 decompressor_initialized_ = true;
382 return Status::OK();
383 }
384
385 void EndDecompressor() {
386 if (decompressor_initialized_) {

Callers

nothing calls this directly

Calls 3

ZlibErrorPrefixFunction · 0.85
OKFunction · 0.50

Tested by

no test coverage detected