Commit 43ff2654 authored by Phus Lu's avatar Phus Lu Committed by Sergey Shepelev
Browse files

Bugfix for Content-Encoding: deflate

Refer to https://stackoverflow.com/a/22311297

zlib library supports:

  RFC 1950 (zlib compressed format)
  RFC 1951 (deflate compressed format)
  RFC 1952 (gzip compressed format)

choosing windowBits

  to (de-)compress deflate format, use wbits = -zlib.MAX_WBITS
  to (de-)compress zlib format, use wbits = zlib.MAX_WBITS
  to (de-)compress gzip format, use wbits = zlib.MAX_WBITS | 16
  See documentation in http://www.zlib.net/manual.html#Advanced

 (section inflateInit2)

Signed-off-by: default avatarPhus Lu <phuslu@hotmail.com>
parent 4b22c7e3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment