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

Function WriteCompressedFile

tensorflow/core/lib/io/zlib_buffers_test.cc:195–210  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

193}
194
195void WriteCompressedFile(Env* env, const string& fname, int input_buf_size,
196 int output_buf_size,
197 const CompressionOptions& output_options,
198 const string& data) {
199 std::unique_ptr<WritableFile> file_writer;
200 TF_ASSERT_OK(env->NewWritableFile(fname, &file_writer));
201
202 ZlibOutputBuffer out(file_writer.get(), input_buf_size, output_buf_size,
203 output_options);
204 TF_ASSERT_OK(out.Init());
205
206 TF_ASSERT_OK(out.Append(StringPiece(data)));
207 TF_ASSERT_OK(out.Close());
208 TF_ASSERT_OK(file_writer->Flush());
209 TF_ASSERT_OK(file_writer->Close());
210}
211
212void TestTell(CompressionOptions input_options,
213 CompressionOptions output_options) {

Callers 2

TestTellFunction · 0.85
TestSkipNBytesFunction · 0.85

Calls 6

NewWritableFileMethod · 0.45
getMethod · 0.45
InitMethod · 0.45
AppendMethod · 0.45
CloseMethod · 0.45
FlushMethod · 0.45

Tested by

no test coverage detected