| 303 | } |
| 304 | |
| 305 | bool zlib_stream::zlib_uncompress(const char* in, int len, string* out, |
| 306 | bool have_zlib_header /* = true */, int wsize /* = 15 */) |
| 307 | { |
| 308 | if (!unzip_begin(have_zlib_header, wsize)) { |
| 309 | unzip_reset(); |
| 310 | return false; |
| 311 | } |
| 312 | |
| 313 | if (!unzip_update(in, len, out, zlib_flush_sync)) { |
| 314 | unzip_reset(); |
| 315 | return false; |
| 316 | } |
| 317 | |
| 318 | return unzip_finish(out); |
| 319 | } |
| 320 | |
| 321 | #define BUF_MIN 4000 |
| 322 |
no outgoing calls