293 {
294 int window_bits = window_bits_;
295 if ((raw_ || gzip_) && (window_bits == 8)) {
296
297
298
299
300
301
302
303 window_bits = 9;
304 }
305 if (raw_) {
306 window_bits = -window_bits;
307 } else if (gzip_) {
309 }
310 stream_.next_in = Z_NULL;
311 stream_.zalloc = Z_NULL;
312 stream_.zfree = Z_NULL;
313 stream_.opaque = Z_NULL;
314 int result = deflateInit2(&stream_, level_, Z_DEFLATED, window_bits,
315 mem_level_, strategy_);
317 return false;
318 }
319 if ((dictionary_ != nullptr) && !gzip_ && !raw_) {
320 result = deflateSetDictionary(&stream_, dictionary_, dictionary_length_);
321 delete[] dictionary_;
322 dictionary_ = nullptr;
324 return false;
325 }
326 }
328 return true;
329}
void set_initialized(bool value)
const int kZLibFlagUseGZipHeader