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

Method Flush

cpp/src/arrow/util/compression_brotli.cc:133–146  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

131 }
132
133 Result<FlushResult> Flush(int64_t output_len, uint8_t* output) override {
134 size_t avail_in = 0;
135 const uint8_t* next_in = nullptr;
136 auto avail_out = static_cast<size_t>(output_len);
137 BROTLI_BOOL ret;
138
139 ret = BrotliEncoderCompressStream(state_, BROTLI_OPERATION_FLUSH, &avail_in, &next_in,
140 &avail_out, &output, nullptr /* total_out */);
141 if (!ret) {
142 return BrotliError("Brotli flush failed");
143 }
144 return FlushResult{static_cast<int64_t>(output_len - avail_out),
145 !!BrotliEncoderHasMoreOutput(state_)};
146 }
147
148 Result<EndResult> End(int64_t output_len, uint8_t* output) override {
149 size_t avail_in = 0;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected