| 587 | } |
| 588 | |
| 589 | bool zlib_stream::zip_finish(string* out) |
| 590 | { |
| 591 | if (zlib_flags_ & zlib_flags_zip_end) { |
| 592 | return true; |
| 593 | } |
| 594 | |
| 595 | zlib_flags_ &= ~zlib_flags_zip_begin; |
| 596 | zlib_flags_ |= zlib_flags_zip_end; |
| 597 | |
| 598 | #ifdef HAS_ZLIB |
| 599 | # if defined(ACL_CPP_DLL) || defined(HAS_ZLIB_DLL) |
| 600 | if (__deflate == NULL || __deflateEnd == NULL) { |
| 601 | logger_warn("zlib maybe not loaded yet"); |
| 602 | return false; |
| 603 | } |
| 604 | # endif |
| 605 | #endif |
| 606 | bool ret = flush_out(__deflate, zlib_flush_finish, out); |
| 607 | //(void) __deflateReset(zstream_); |
| 608 | __deflateEnd(zstream_); |
| 609 | return ret; |
| 610 | } |
| 611 | |
| 612 | bool zlib_stream::zip_reset() |
| 613 | { |
no outgoing calls