| { |
| "name": "adm-zip", |
| "version": "0.4.4", |
| "description": "A Javascript implementation of zip for nodejs. Allows user to create or extract zip files both in memory or to/from disk", |
| "keywords": [ |
| "zip", |
| "methods", |
| "archive", |
| "unzip" |
| ], |
| "homepage": "http://github.com/cthackers/adm-zip", |
| "author": { |
| "name": "Nasca Iacob", |
| "email": "sy@another-d-mention.ro", |
| "url": "https://github.com/cthackers" |
| }, |
| "bugs": { |
| "url": "https://github.com/cthackers/adm-zip/issues", |
| "email": "sy@another-d-mention.ro" |
| }, |
| "licenses": [ |
| { |
| "type": "MIT", |
| "url": "https://raw.github.com/cthackers/adm-zip/master/MIT-LICENSE.txt" |
| } |
| ], |
| "main": "adm-zip.js", |
| "repository": { |
| "type": "git", |
| "url": "https://github.com/cthackers/adm-zip.git" |
| }, |
| "engines": { |
| "node": ">=0.3.0" |
| }, |
| "readme": "# ADM-ZIP for NodeJS\r\n\r\nADM-ZIP is a pure JavaScript implementation for zip data compression for [NodeJS](http://nodejs.org/). \r\n\r\n# Installation\r\n\r\nWith [npm](http://npmjs.org) do:\r\n\r\n $ npm install adm-zip\r\n\t\r\n## What is it good for?\r\nThe library allows you to:\r\n\r\n* decompress zip files directly to disk or in memory buffers\r\n* compress files and store them to disk in .zip format or in compressed buffers\r\n* update content of/add new/delete files from an existing .zip\r\n\r\n# Dependencies\r\nThere are no other nodeJS libraries that ADM-ZIP is dependent of\r\n\r\n# Examples\r\n\r\n## Basic usage\r\n```javascript\r\n\r\n\tvar AdmZip = require('adm-zip');\r\n\r\n\t// reading archives\r\n\tvar zip = new AdmZip(\"./my_file.zip\");\r\n\tvar zipEntries = zip.getEntries(); // an array of ZipEntry records\r\n\r\n\tzipEntries.forEach(function(zipEntry) {\r\n\t console.log(zipEntry.toString()); // outputs zip entries information\r\n\t\tif (zipEntry.entryName == \"my_file.txt\") {\r\n\t\t console.log(zipEntry.data.toString('utf8')); \r\n\t\t}\r\n\t});\r\n\t// outputs the content of some_folder/my_file.txt\r\n\tconsole.log(zip.readAsText(\"some_folder/my_file.txt\")); \r\n\t// extracts the specified file to the specified location\r\n\tzip.extractEntryTo(/*entry name*/\"some_folder/my_file.txt\", /*target path*/\"/home/me/tempfolder\", /*maintainEntryPath*/false, /*overwrite*/true);\r\n\t// extracts everything\r\n\tzip.extractAllTo(/*target path*/\"/home/me/zipcontent/\", /*overwrite*/true);\r\n\t\r\n\t\r\n\t// creating archives\r\n\tvar zip = new AdmZip();\r\n\t\r\n\t// add file directly\r\n\tzip.addFile(\"test.txt\", new Buffer(\"inner content of the file\"), \"entry comment goes here\");\r\n\t// add local file\r\n\tzip.addLocalFile(\"/home/me/some_picture.png\");\r\n\t// get everything as a buffer\r\n\tvar willSendthis = zip.toBuffer();\r\n\t// or write everything to disk\r\n\tzip.writeZip(/*target file name*/\"/home/me/files.zip\");\r\n\t\r\n\t\r\n\t// ... more examples in the wiki\r\n```\r\n\r\nFor more detailed information please check out the [wiki](https://github.com/cthackers/adm-zip/wiki).\r\n\r\n[![build status](https://secure.travis-ci.org/cthackers/adm-zip.png)](http://travis-ci.org/cthackers/adm-zip)\r\n", |
| "readmeFilename": "README.md", |
| "_id": "adm-zip@0.4.4", |
| "_from": "adm-zip@" |
| } |