| 678 | } |
| 679 | |
| 680 | bool zlib_stream::unzip_finish(string* out) |
| 681 | { |
| 682 | if (zlib_flags_ & zlib_flags_unzip_end) { |
| 683 | return true; |
| 684 | } |
| 685 | |
| 686 | zlib_flags_ &= ~zlib_flags_unzip_begin; |
| 687 | zlib_flags_ |= zlib_flags_unzip_end; |
| 688 | |
| 689 | #ifdef HAS_ZLIB |
| 690 | # if defined(ACL_CPP_DLL) || defined(HAS_ZLIB_DLL) |
| 691 | if (__inflate == NULL || __inflateEnd == NULL) { |
| 692 | logger_warn("zlib maybe not loaded yet"); |
| 693 | return false; |
| 694 | } |
| 695 | # endif |
| 696 | #endif |
| 697 | bool ret = flush_out(__inflate, zlib_flush_finish, out); |
| 698 | //(void) __inflateReset(zstream_); |
| 699 | __inflateEnd(zstream_); |
| 700 | return ret; |
| 701 | } |
| 702 | |
| 703 | bool zlib_stream::unzip_reset() |
| 704 | { |
no outgoing calls