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

Method unzip_begin

lib_acl_cpp/src/stdlib/zlib_stream.cpp:638–664  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

636}
637
638bool zlib_stream::unzip_begin(bool have_zlib_header /* = true */,
639 int wsize /* = 15 */)
640{
641#ifdef HAS_ZLIB
642# if defined(ACL_CPP_DLL) || defined(HAS_ZLIB_DLL)
643 if (__inflateInit2 == NULL) {
644 logger_warn("__inflateInit2 null, zlib maybe not loaded yet");
645 return false;
646 }
647# endif
648#endif
649 zlib_flags_ = zlib_flags_unzip_begin;
650 finished_ = false;
651 is_compress_ = false;
652
653#ifdef COSMOCC
654 int ret = __inflateInit2(zstream_, have_zlib_header ? wsize : -wsize);
655#else
656 int ret = __inflateInit2(zstream_, have_zlib_header ?
657 wsize : -wsize, ZLIB_VERSION, sizeof(z_stream));
658#endif
659 if (ret != Z_OK) {
660 logger_error("inflateInit error");
661 return (false);
662 }
663 return true;
664}
665
666bool zlib_stream::unzip_update(const char* in, int len, string* out,
667 zlib_flush_t flag /* = zlib_flush_off */)

Callers 4

test_zip_streamFunction · 0.80
test_unzip_fileFunction · 0.80
read_response_headMethod · 0.80
handle_res_hdrMethod · 0.80

Calls

no outgoing calls

Tested by 2

test_zip_streamFunction · 0.64
test_unzip_fileFunction · 0.64