MCPcopy Create free account
hub / github.com/acl-dev/acl / zlib_compress

Method zlib_compress

lib_acl_cpp/src/stdlib/zlib_stream.cpp:289–303  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

287}
288
289bool zlib_stream::zlib_compress(const char* in, int len, string* out,
290 zlib_level_t level /* = zlib_default */)
291{
292 if (!zip_begin(level)) {
293 zip_reset();
294 return false;
295 }
296
297 if (!zip_update(in, len, out, zlib_flush_sync)) {
298 zip_reset();
299 return false;
300 }
301
302 return zip_finish(out);
303}
304
305bool zlib_stream::zlib_uncompress(const char* in, int len, string* out,
306 bool have_zlib_header /* = true */, int wsize /* = 15 */)

Callers 1

test_compressFunction · 0.80

Calls

no outgoing calls

Tested by 1

test_compressFunction · 0.64