title: How to extract a ZIP file from a HTTP resource with node.js
body: <p>How to extract a ZIP file from a HTTP resource with node.js?</p>
  
  <p>I tried the the below code but got an error indicating the ZIP file may be corrupt (which it isn't):</p>
  
  <pre><code>require('node-zip');
  var request = require('request');
  
  request('http://data.geo.admin.ch.s3.amazonaws.com/ch.meteoschweiz.swissmetnet/data.zip', function (error, response, body) {
    if (!error &amp;&amp; response.statusCode == 200) {
      console.log(new JSZip(body, {base64: false, checkCRC32: true}).files);
    }
  })
  </code></pre>
  
  <p>Error:</p>
  
  <blockquote>
    <p>Error: End of data reached (data length = 230973, asked index =
    261475). Corrupted zip ?</p>
  </blockquote>