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

Method DoWrite

library/cpp/blockcodecs/core/stream.cpp:84–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82}
83
84void TCodedOutput::DoWrite(const void* buf, size_t len) {
85 const char* in = (const char*)buf;
86
87 while (len) {
88 const size_t avail = D_.Avail();
89
90 if (len < avail) {
91 D_.Append(in, len);
92
93 return;
94 }
95
96 D_.Append(in, avail);
97
98 Y_ASSERT(!D_.Avail());
99
100 in += avail;
101 len -= avail;
102
103 Y_ABORT_UNLESS(FlushImpl(), "flush on writing failed");
104 }
105}
106
107bool TCodedOutput::FlushImpl() {
108 const bool ret = !D_.Empty();

Callers

nothing calls this directly

Calls 2

AvailMethod · 0.45
AppendMethod · 0.45

Tested by

no test coverage detected