{"action":"created","issue":{"url":"https://api.github.com/repos/kevva/decompress-unzip/issues/3","labels_url":"https://api.github.com/repos/kevva/decompress-unzip/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/kevva/decompress-unzip/issues/3/comments","events_url":"https://api.github.com/repos/kevva/decompress-unzip/issues/3/events","html_url":"https://github.com/kevva/decompress-unzip/issues/3","id":57303478,"number":3,"title":"Unzip benchmark","user":{"login":"shinnn","id":1131567,"avatar_url":"https://avatars.githubusercontent.com/u/1131567?v=3","gravatar_id":"","url":"https://api.github.com/users/shinnn","html_url":"https://github.com/shinnn","followers_url":"https://api.github.com/users/shinnn/followers","following_url":"https://api.github.com/users/shinnn/following{/other_user}","gists_url":"https://api.github.com/users/shinnn/gists{/gist_id}","starred_url":"https://api.github.com/users/shinnn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shinnn/subscriptions","organizations_url":"https://api.github.com/users/shinnn/orgs","repos_url":"https://api.github.com/users/shinnn/repos","events_url":"https://api.github.com/users/shinnn/events{/privacy}","received_events_url":"https://api.github.com/users/shinnn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-11T11:19:50Z","updated_at":"2015-02-11T12:16:18Z","closed_at":null,"body":"I created a benchmark to see which unzip module is the fastest.\r\n\r\n## modules\r\n\r\n* [adm-zip](https://github.com/cthackers/adm-zip) (currently this project uses)\r\n* [decompress-zip](https://github.com/bower/decompress-zip)\r\n* [extract-zip](https://github.com/maxogden/extract-zip)\r\n* [node-unzip](https://github.com/EvanOxfeld/node-unzip)\r\n\r\n## benchmark script\r\n\r\n(Using [matcha](https://github.com/logicalparadox/matcha))\r\n\r\n```js\r\n'use strict';\r\n\r\nvar fs = require('fs');\r\n\r\nvar rimraf = require('rimraf');\r\n\r\nvar AdmZip = require('adm-zip');\r\nvar DecompressZip = require('decompress-zip');\r\nvar extractZip = require('extract-zip');\r\nvar unzip = require('unzip');\r\n\r\nvar FIXTURE_PATH = 'fixture.zip'; // path to a ZIP file\r\n\r\nsuite('Extract all files from a ZIP archive', function() {\r\n  set('iterations', 10);\r\n\r\n  before(rimraf.bind(null, 'tmp'));\r\n\r\n  bench('adm-zip', function() {\r\n    new AdmZip(FIXTURE_PATH).extractAllTo('tmp/adm-zip', true);\r\n  });\r\n\r\n  bench('decompress-zip', function(next) {\r\n    new DecompressZip(FIXTURE_PATH)\r\n    .on('extract', next)\r\n    .on('error', next)\r\n    .extract({path: 'tmp/decompress-zip'});\r\n  });\r\n\r\n  bench('extract-zip', function(next) {\r\n    extractZip(FIXTURE_PATH, {dir: 'tmp/extract-zip'}, next);\r\n  });\r\n\r\n  bench('node-unzip', function(next) {\r\n    var extract = new unzip.Extract({path: 'tmp/unzip/'})\r\n    .on('finish', next)\r\n    .on('error', next);\r\n\r\n    fs.createReadStream(FIXTURE_PATH).pipe(extract);\r\n  });\r\n});\r\n```\r\n\r\n### result\r\n\r\n```sh\r\n                      Extract all files from a ZIP archive\r\n              43 op/s » adm-zip\r\n             112 op/s » decompress-zip\r\n              70 op/s » extract-zip\r\n              49 op/s » node-unzip\r\n\r\n```\r\n\r\nI think we should replace adm-zip with another module.\r\n"},"comment":{"url":"https://api.github.com/repos/kevva/decompress-unzip/issues/comments/73872261","html_url":"https://github.com/kevva/decompress-unzip/issues/3#issuecomment-73872261","issue_url":"https://api.github.com/repos/kevva/decompress-unzip/issues/3","id":73872261,"user":{"login":"kevva","id":709159,"avatar_url":"https://avatars.githubusercontent.com/u/709159?v=3","gravatar_id":"","url":"https://api.github.com/users/kevva","html_url":"https://github.com/kevva","followers_url":"https://api.github.com/users/kevva/followers","following_url":"https://api.github.com/users/kevva/following{/other_user}","gists_url":"https://api.github.com/users/kevva/gists{/gist_id}","starred_url":"https://api.github.com/users/kevva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevva/subscriptions","organizations_url":"https://api.github.com/users/kevva/orgs","repos_url":"https://api.github.com/users/kevva/repos","events_url":"https://api.github.com/users/kevva/events{/privacy}","received_events_url":"https://api.github.com/users/kevva/received_events","type":"User","site_admin":false},"created_at":"2015-02-11T12:16:18Z","updated_at":"2015-02-11T12:16:18Z","body":"Too bad `decompress-zip` doesn't support listing the files contents and their attributes on the `list` event."}}