title: Zlib incorrect header check when decompressing
body: <p>I need to receive a zip file from a server, extract it and pipe its contents elsewhere.</p>
  <p>However when trying to extract it with <code>createInflate</code> from the zlib builtin package, I get the error <code>Error: incorrect header check</code></p>
  <p>(I have tried with <code>createUnzip</code> and <code>createGunzip</code> too)</p>
  <p>Downloading the file with cUrl and extracting it with the <code>unzip</code> linux command works correctly.</p>
  <pre class="lang-sh prettyprint-override"><code>$ unzip report.zip 
  Archive:  report.zip
    inflating: report.csv
  </code></pre>
  <pre><code>$ zipinfo -v report.zip
  [...]
    file system or operating system of origin:      MS-DOS, OS/2 or NT FAT
    version of encoding software:                   2.0
    minimum file system compatibility required:     MS-DOS, OS/2 or NT FAT
    minimum software version required to extract:   2.0
    compression method:                             deflated
    compression sub-type (deflation):               normal
    file security status:                           not encrypted
    extended local header:                          yes
  [...]
  </code></pre>
  <h3>Code used to extract the already downloaded file:</h3>
  <pre class="lang-js prettyprint-override"><code>const pipeline = promisify(stream.pipeline);
  
  (async () =&gt; {
    const unzipper = createInflate();
    const sourceStream = fs.createReadStream('report.zip');
    const destStream = fs.createWriteStream('report.csv');
  
    await pipeline(sourceStream, unzipper, destStream);
  })();
  </code></pre>
  <p>Note that the error is the same between piping the response directly and piping the result of <code>createReadStream</code></p>
  <h3>Full <code>zipinfo -v</code>:</h3>
  <pre><code>$ zipinfo -v report.zip
  Archive:  report.zip
  There is no zipfile comment.
  
  End-of-central-directory record:
  -------------------------------
  
    Zip archive file size:                       527 (000000000000020Fh)
    Actual end-cent-dir record offset:           505 (00000000000001F9h)
    Expected end-cent-dir record offset:         505 (00000000000001F9h)
    (based on the length of the central directory and its expected offset)
  
    This zipfile constitutes the sole disk of a single-part archive; its
    central directory contains 1 entry.
    The central directory is 78 (000000000000004Eh) bytes long,
    and its (expected) offset in bytes from the beginning of the zipfile
    is 427 (00000000000001ABh).
  
  
  Central directory entry #1:
  ---------------------------
  
    report_SMS_1f7c2069_20200730.csv
  
    offset of local header from start of archive:   0
                                                    (0000000000000000h) bytes
    file system or operating system of origin:      MS-DOS, OS/2 or NT FAT
    version of encoding software:                   2.0
    minimum file system compatibility required:     MS-DOS, OS/2 or NT FAT
    minimum software version required to extract:   2.0
    compression method:                             deflated
    compression sub-type (deflation):               normal
    file security status:                           not encrypted
    extended local header:                          yes
    file last modified on (DOS date/time):          2020 Jul 30 11:05:48
    32-bit CRC value (hex):                         5abe6238
    compressed size:                                349 bytes
    uncompressed size:                              934 bytes
    length of filename:                             32 characters
    length of extra field:                          0 bytes
    length of file comment:                         0 characters
    disk number on which file begins:               disk 1
    apparent file type:                             binary
    non-MSDOS external file attributes:             000000 hex
    MS-DOS file attributes (00 hex):                none
  
    There is no file comment.
  </code></pre>