| 727 | } |
| 728 | |
| 729 | int zlib_stream::push_pop(const char* in, size_t len, |
| 730 | string* out, size_t max /* = 0 */ acl_unused) |
| 731 | { |
| 732 | if (out == NULL) { |
| 733 | return 0; |
| 734 | } |
| 735 | |
| 736 | size_t n = out->length(); |
| 737 | |
| 738 | if (is_compress_) { |
| 739 | if (!zip_update(in, (int) len, out, flush_)) { |
| 740 | return -1; |
| 741 | } |
| 742 | } else { |
| 743 | if (!unzip_update(in, (int) len, out, flush_)) { |
| 744 | return -1; |
| 745 | } |
| 746 | } |
| 747 | |
| 748 | return (int) (out->length() - n); |
| 749 | } |
| 750 | |
| 751 | int zlib_stream::pop_end(string* out, size_t max /* = 0 */ acl_unused) |
| 752 | { |