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

Function Finish

util/stream/zlib.cpp:291–304  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

289 }
290
291 inline void Finish() {
292 int ret = deflate(Z(), Z_FINISH);
293
294 while (ret == Z_OK || ret == Z_BUF_ERROR) {
295 FlushBuffer();
296 ret = deflate(Z(), Z_FINISH);
297 }
298
299 if (ret == Z_STREAM_END) {
300 Stream_->Write(TmpBuf(), TmpBufLen() - Z()->avail_out);
301 } else {
302 ythrow TZLibCompressorError() << "deflate finish error(" << GetErrMsg() << ")";
303 }
304 }
305
306private:
307 inline unsigned char* TmpBuf() noexcept {

Callers 4

~TBufferedOutputBaseMethod · 0.70
zlib.cppFile · 0.70
~TSocketOutputMethod · 0.50

Calls 3

deflateFunction · 0.85
FlushBufferFunction · 0.85
WriteMethod · 0.45

Tested by

no test coverage detected