MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / FlushOutputBufferToFile

Method FlushOutputBufferToFile

tensorflow/core/lib/io/zlib_outputbuffer.cc:131–143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129}
130
131Status ZlibOutputBuffer::FlushOutputBufferToFile() {
132 uint32 bytes_to_write = output_buffer_capacity_ - z_stream_->avail_out;
133 if (bytes_to_write > 0) {
134 Status s = file_->Append(StringPiece(
135 reinterpret_cast<char*>(z_stream_output_.get()), bytes_to_write));
136 if (s.ok()) {
137 z_stream_->next_out = z_stream_output_.get();
138 z_stream_->avail_out = output_buffer_capacity_;
139 }
140 return s;
141 }
142 return Status::OK();
143}
144
145Status ZlibOutputBuffer::Append(StringPiece data) {
146 // If there is sufficient free space in z_stream_input_ to fit data we

Callers

nothing calls this directly

Calls 3

AppendMethod · 0.45
getMethod · 0.45
okMethod · 0.45

Tested by

no test coverage detected