{"name":"adm-zip","version":"0.6.0","keywords":["zip","methods","archive","unzip"],"author":{"url":"https://github.com/cthackers","name":"Nasca Iacob","email":"adm-zip@pm.me"},"license":"MIT","_id":"adm-zip@0.6.0","maintainers":[{"name":"cthackers","email":"iacob.campia@gmail.com"}],"homepage":"https://github.com/cthackers/adm-zip","bugs":{"url":"https://github.com/cthackers/adm-zip/issues","email":"adm-zip@pm.me"},"dist":{"shasum":"bbc5c6c333755e967a06dd98747f431e1d53a3cf","tarball":"http://registry-npm.ywwl.com/adm-zip/download/adm-zip-0.6.0.tgz","fileCount":20,"integrity":"sha512-XleryMhbuksdKtofnWZ9Sk+4CUTbms4Mb/EU32SZwToAyZ5RgVos/ki8n+yr0LWHOGKuakbXTuuYNHLQjhddgg==","signatures":[{"sig":"MEQCIEnbrFD/UUOqIU8ThWNrXkKQzwHcrPF+zAOXAMUCejuZAiAn+S+38tU/6Xsx96/QNScQp8nfYsLytgRdTni2Pgj6GQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":140065,"size":32244,"noattachment":false,"key":"/adm-zip/-/adm-zip-0.6.0.tgz"},"main":"adm-zip.js","types":"types.d.ts","engines":{"node":">=14.0"},"gitHead":"2b4d84087d45344643e0183756e19191d52815cc","scripts":{"test":"mocha -R spec","format":"npm run format:prettier","test:format":"npm run format:prettier:raw -- --check","format:prettier":"npm run format:prettier:raw -- --write","format:prettier:raw":"prettier \"**/*.{js,yml,json}\""},"_npmUser":{"name":"cthackers","email":"iacob.campia@gmail.com"},"overrides":{"mocha":{"chokidar":"^4.0.3"}},"repository":{"url":"git+https://github.com/cthackers/adm-zip.git","type":"git"},"_npmVersion":"11.11.0","description":"Javascript implementation of zip for nodejs with support for electron original-fs. Allows user to create or extract zip files both in memory or to/from disk","directories":{},"_nodeVersion":"25.2.1","_hasShrinkwrap":false,"devDependencies":{"chai":"^6.2.2","mocha":"12.0.0-beta-10","rimraf":"^3.0.2","prettier":"^3.8.1","iconv-lite":"^0.7.2"},"_npmOperationalInternal":{"tmp":"tmp/adm-zip_0.6.0_1783714104320_0.9130091348527225","host":"s3://npm-registry-packages-npm-production"},"readme":"# ADM-ZIP for NodeJS\n\nADM-ZIP is a pure JavaScript implementation for zip data compression for [NodeJS](https://nodejs.org/).\n\n<a href=\"https://github.com/cthackers/adm-zip/actions/workflows/ci.yml\">\n  <img src=\"https://github.com/cthackers/adm-zip/actions/workflows/ci.yml/badge.svg\" alt=\"Build Status\">\n</a>\n\n# Installation\n\nWith [npm](https://www.npmjs.com/) do:\n\n    $ npm install adm-zip\n\n**Electron** file system support described below.\n\n## What is it good for?\n\nThe library allows you to:\n\n-   decompress zip files directly to disk or in memory buffers\n-   compress files and store them to disk in .zip format or in compressed buffers\n-   update content of/add new/delete files from an existing .zip\n\n# Dependencies\n\nThere are no other nodeJS libraries that ADM-ZIP is dependent of\n\n# Examples\n\n## Basic usage\n\n```javascript\nvar AdmZip = require(\"adm-zip\");\n\n// reading archives\nvar zip = new AdmZip(\"./my_file.zip\");\nvar password = \"1234567890\";\nvar zipEntries = zip.getEntries(); // an array of ZipEntry records - add password parameter if entries are password protected\n\nzipEntries.forEach(function (zipEntry) {\n    console.log(zipEntry.toString()); // outputs zip entries information\n    if (zipEntry.entryName == \"my_file.txt\") {\n        console.log(zipEntry.getData().toString(\"utf8\"));\n    }\n});\n// outputs the content of some_folder/my_file.txt\nconsole.log(zip.readAsText(\"some_folder/my_file.txt\"));\n// extracts the specified file to the specified location\nzip.extractEntryTo(/*entry name*/ \"some_folder/my_file.txt\", /*target path*/ \"/home/me/tempfolder\", /*maintainEntryPath*/ false, /*overwrite*/ true);\n// extracts everything\nzip.extractAllTo(/*target path*/ \"/home/me/zipcontent/\", /*overwrite*/ true);\n\n// creating archives\nvar zip = new AdmZip();\n\n// add file directly\nvar content = \"inner content of the file\";\nzip.addFile(\"test.txt\", Buffer.from(content, \"utf8\"), \"entry comment goes here\");\n// add local file\nzip.addLocalFile(\"/home/me/some_picture.png\");\n// get everything as a buffer\nvar willSendthis = zip.toBuffer();\n// or write everything to disk\nzip.writeZip(/*target file name*/ \"/home/me/files.zip\");\n\n// ... more examples in the wiki\n```\n\nFor more detailed information please check out the [wiki](https://github.com/cthackers/adm-zip/wiki).\n\n## Electron original-fs\n\nADM-ZIP has supported electron **original-fs** for years without any user interractions but it causes problem with bundlers like rollup etc. For continuing support **original-fs** or any other custom file system module. There is possible specify your module by **fs** option in ADM-ZIP constructor.\n\nExample:\n\n```javascript\nconst AdmZip = require(\"adm-zip\");\nconst OriginalFs = require(\"original-fs\");\n\n// reading archives\nconst zip = new AdmZip(\"./my_file.zip\", { fs: OriginalFs });\n.\n.\n.\n```\n## Security\n\nPlease report security vulnerabilities privately. See [SECURITY.md](./SECURITY.md).\n","publish_time":1783714104472,"_cnpm_publish_time":1783714104472,"dist-tags":{"latest":"0.6.1"}}