title: How to unzip file with Node.js
body: <p>I need to zip and unzip file with Node.js but I have a problem.</p>
  
  <pre><code>const fs = require("fs");
  const zlib = require('zlib');
  
  
  
  function UnZip(zip, paths) {
  
    var inp = fs.createReadStream("f:/test.zip");
  
    var Exzip = zlib.createUnzip();
  
    inp.pipe(Exzip).pipe("f:/");
  
  }
  </code></pre>
  
  <p>Error:</p>
  
  <blockquote>
    <p>TypeError: dest.on is not a function</p>
  </blockquote>