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

Method End

cpp/src/arrow/util/compression_bz2.cc:208–221  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

206 }
207
208 Result<EndResult> End(int64_t output_len, uint8_t* output) override {
209 stream_.next_in = nullptr;
210 stream_.avail_in = 0;
211 stream_.next_out = reinterpret_cast<char*>(output);
212 stream_.avail_out = static_cast<unsigned int>(std::min(output_len, kSizeLimit));
213 int ret;
214
215 ret = BZ2_bzCompress(&stream_, BZ_FINISH);
216 if (ret == BZ_STREAM_END || ret == BZ_FINISH_OK) {
217 return EndResult{output_len - stream_.avail_out, (ret == BZ_FINISH_OK)};
218 } else {
219 return BZ2Error("bz2 compress failed: ", ret);
220 }
221 }
222
223 protected:
224 bz_stream stream_;

Callers

nothing calls this directly

Calls 1

BZ2ErrorFunction · 0.85

Tested by

no test coverage detected