MCPcopy Create free account
hub / github.com/catboost/catboost / Flush

Function Flush

util/stream/zlib.cpp:268–283  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

266 }
267
268 inline void Flush() {
269 int ret = deflate(Z(), Z_SYNC_FLUSH);
270
271 while ((ret == Z_OK || ret == Z_BUF_ERROR) && !Z()->avail_out) {
272 FlushBuffer();
273 ret = deflate(Z(), Z_SYNC_FLUSH);
274 }
275
276 if (ret != Z_OK && ret != Z_BUF_ERROR) {
277 ythrow TZLibCompressorError() << "deflate flush error(" << GetErrMsg() << ")";
278 }
279
280 if (Z()->avail_out < TmpBufLen()) {
281 FlushBuffer();
282 }
283 }
284
285 inline void FlushBuffer() {
286 Stream_->Write(TmpBuf(), TmpBufLen() - Z()->avail_out);

Callers 6

DoFinishMethod · 0.70
FinishMethod · 0.70
DoFinishMethod · 0.50
FlushDataMethod · 0.50
FlushMethod · 0.50
FlushAsyncMethod · 0.50

Calls 2

deflateFunction · 0.85
FlushBufferFunction · 0.85

Tested by

no test coverage detected