{"_id":"@develar/asar","_rev":"4244419","name":"@develar/asar","description":"Creating atom-shell app packages","dist-tags":{"latest":"0.13.1"},"maintainers":[{"name":"develar","email":""}],"time":{"modified":"2026-03-29T21:26:52.000Z","created":"2016-07-12T07:20:38.756Z","0.13.1":"2016-07-22T05:46:09.664Z","0.13.0":"2016-07-22T05:42:49.221Z","0.11.1":"2016-07-12T07:20:38.756Z"},"users":{},"repository":{"type":"git","url":"git+https://github.com/electron/asar.git"},"versions":{"0.13.1":{"main":"./lib/asar.js","name":"@develar/asar","description":"Creating atom-shell app packages","version":"0.13.1","bin":{"asar":"bin/asar"},"license":"MIT","homepage":"https://github.com/electron/asar","repository":{"type":"git","url":"git+https://github.com/electron/asar.git"},"bugs":{"url":"https://github.com/electron/asar/issues"},"scripts":{"prepublish":"grunt coffee","pretest":"grunt clean coffeelint coffee","test":"mocha --reporter spec --compilers coffee:coffee-script/register","clean":"grunt clean"},"dependencies":{"chromium-pickle-js":"^0.1.0","commander":"^2.9.0","cuint":"^0.2.1","minimatch":"^3.0.2","mkdirp":"^0.5.1"},"devDependencies":{"glob":"^7.0.5","coffee-script":"^1.10.0","grunt":"^1.0.1","grunt-cli":"^1.2.0","grunt-coffeelint":"git+https://github.com/atom/grunt-coffeelint.git#cfb99aa99811d52687969532bd5a98011ed95bfe","grunt-contrib-coffee":"^1.0.0","lodash":"^4.13.1","mocha":"^2.5.3","rimraf":"^2.5.3"},"gitHead":"05be250c981e57e0288d1508d0139a0954d5c98c","_id":"@develar/asar@0.13.1","_shasum":"4801559db57fd609589ede244f5cdcdc63318cc6","_from":".","_npmVersion":"3.10.6","_nodeVersion":"6.3.0","_npmUser":{"name":"develar","email":"develar@gmail.com"},"dist":{"shasum":"4801559db57fd609589ede244f5cdcdc63318cc6","size":7345,"noattachment":false,"key":"/@develar/asar/-/@develar/asar-0.13.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/@develar/asar/download/@develar/asar-0.13.1.tgz"},"maintainers":[{"name":"develar","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/asar-0.13.1.tgz_1469166367929_0.09122173092328012"},"directories":{},"publish_time":1469166369664,"_hasShrinkwrap":false,"_cnpm_publish_time":1469166369664,"_cnpmcore_publish_time":"2021-12-17T01:15:55.369Z"},"0.13.0":{"main":"./lib/asar.js","name":"@develar/asar","description":"Creating atom-shell app packages","version":"0.13.0","bin":{"asar":"bin/asar"},"license":"MIT","homepage":"https://github.com/electron/asar","repository":{"type":"git","url":"git+https://github.com/electron/asar.git"},"bugs":{"url":"https://github.com/electron/asar/issues"},"scripts":{"prepublish":"grunt coffee","pretest":"grunt clean coffeelint coffee","test":"mocha --reporter spec --compilers coffee:coffee-script/register","clean":"grunt clean"},"dependencies":{"chromium-pickle-js":"^0.1.0","commander":"^2.9.0","cuint":"^0.2.1","minimatch":"^3.0.2","mkdirp":"^0.5.1"},"devDependencies":{"glob":"^7.0.5","coffee-script":"^1.10.0","grunt":"^1.0.1","grunt-cli":"^1.2.0","grunt-coffeelint":"git+https://github.com/atom/grunt-coffeelint.git#cfb99aa99811d52687969532bd5a98011ed95bfe","grunt-contrib-coffee":"^1.0.0","lodash":"^4.13.1","mocha":"^2.5.3","rimraf":"^2.5.3"},"gitHead":"05be250c981e57e0288d1508d0139a0954d5c98c","_id":"@develar/asar@0.13.0","_shasum":"1874d26dc060a663162d02a50c62c21e0a69d23a","_from":".","_npmVersion":"3.10.6","_nodeVersion":"6.3.0","_npmUser":{"name":"develar","email":"develar@gmail.com"},"dist":{"shasum":"1874d26dc060a663162d02a50c62c21e0a69d23a","size":16167,"noattachment":false,"key":"/@develar/asar/-/@develar/asar-0.13.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@develar/asar/download/@develar/asar-0.13.0.tgz"},"maintainers":[{"name":"develar","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/asar-0.13.0.tgz_1469166167226_0.9212120187003165"},"directories":{},"publish_time":1469166169221,"_hasShrinkwrap":false,"_cnpm_publish_time":1469166169221,"_cnpmcore_publish_time":"2021-12-17T01:15:55.654Z"},"0.11.1":{"main":"./lib/asar.js","name":"@develar/asar","description":"Creating atom-shell app packages","version":"0.11.1","bin":{"asar":"bin/asar"},"license":"MIT","homepage":"https://github.com/electron/asar","repository":{"type":"git","url":"git+https://github.com/electron/asar.git"},"bugs":{"url":"https://github.com/electron/asar/issues"},"scripts":{"prepublish":"grunt coffee","pretest":"grunt clean coffeelint coffee","test":"mocha --reporter spec --compilers coffee:coffee-script/register","clean":"grunt clean"},"dependencies":{"chromium-pickle-js":"^0.1.0","commander":"^2.9.0","cuint":"^0.2.1","glob":"^7.0.5","minimatch":"^3.0.2","mkdirp":"^0.5.1","mksnapshot":"^0.3.0"},"devDependencies":{"coffee-script":"^1.10.0","grunt":"^1.0.1","grunt-cli":"^1.2.0","grunt-coffeelint":"git+https://github.com/atom/grunt-coffeelint.git#cfb99aa99811d52687969532bd5a98011ed95bfe","grunt-contrib-coffee":"^1.0.0","lodash":"^4.13.1","mocha":"^2.5.3","rimraf":"^2.5.3"},"gitHead":"05be250c981e57e0288d1508d0139a0954d5c98c","_id":"@develar/asar@0.11.1","_shasum":"51fca1006d9a2bed8b211ade6b6c75cc36860c17","_from":".","_npmVersion":"3.10.5","_nodeVersion":"6.3.0","_npmUser":{"name":"develar","email":"develar@gmail.com"},"dist":{"shasum":"51fca1006d9a2bed8b211ade6b6c75cc36860c17","size":14748,"noattachment":false,"key":"/@develar/asar/-/@develar/asar-0.11.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/@develar/asar/download/@develar/asar-0.11.1.tgz"},"maintainers":[{"name":"develar","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/asar-0.11.1.tgz_1468308036006_0.6674806037917733"},"directories":{},"publish_time":1468308038756,"_hasShrinkwrap":false,"_cnpm_publish_time":1468308038756,"_cnpmcore_publish_time":"2021-12-17T01:15:55.914Z"}},"readme":"# asar - Electron Archive\n\n[![build status](http://img.shields.io/travis/electron/asar.svg?style=flat-square)](https://travis-ci.org/electron/asar)\n[![dependencies](http://img.shields.io/david/electron/asar.svg?style=flat-square)](https://david-dm.org/electron/asar)\n[![npm version](http://img.shields.io/npm/v/asar.svg?style=flat-square)](https://npmjs.org/package/asar)\n\nAsar is a simple extensive archive format, it works like `tar` that concatenates\nall files together without compression, while having random access support.\n\n## Features\n\n* Support random access\n* Use JSON to store files' information\n* Very easy to write a parser\n\n## Command line utility\n\n### Install\n\n```bash\n$ npm install asar\n```\n\n### Usage\n\n```bash\n$ asar --help\n\n  Usage: asar [options] [command]\n\n  Commands:\n\n    pack|p <dir> <output>\n       create asar archive\n\n    list|l <archive>\n       list files of asar archive\n\n    extract-file|ef <archive> <filename>\n       extract one file from archive\n\n    extract|e <archive> <dest>\n       extract archive\n\n\n  Options:\n\n    -h, --help     output usage information\n    -V, --version  output the version number\n\n```\n\n#### Excluding multiple resources from being packed\n\nGiven:\n```\n    app\n(a) ├── x1\n(b) ├── x2\n(c) ├── y3\n(d) │   ├── x1\n(e) │   └── z1\n(f) │       └── x2\n(g) └── z4\n(h)     └── w1\n```\n\nExclude: a, b\n```bash\n$ asar pack app app.asar --unpack-dir \"{x1,x2}\"\n```\n\nExclude: a, b, d, f\n```bash\n$ asar pack app app.asar --unpack-dir \"**/{x1,x2}\"\n```\n\nExclude: a, b, d, f, h\n```bash\n$ asar pack app app.asar --unpack-dir \"{**/x1,**/x2,z4/w1}\"\n```\n\n## Using programatically\n\n### Example\n\n```js\nvar asar = require('asar');\n\nvar src = 'some/path/';\nvar dest = 'name.asar';\n\nasar.createPackage(src, dest, function() {\n  console.log('done.');\n})\n```\n\nPlease note that there is currently *no* error handling provided!\n\n## Using with grunt\n\nThere is also an unofficial grunt plugin to generate asar archives at [bwin/grunt-asar][grunt-asar].\n\n## Format\n\nAsar uses [Pickle][pickle] to safely serialize binary value to file, there is\nalso a [node.js binding][node-pickle] of `Pickle` class.\n\nThe format of asar is very flat:\n\n```\n| UInt32: header_size | String: header | Bytes: file1 | ... | Bytes: file42 |\n```\n\nThe `header_size` and `header` are serialized with [Pickle][pickle] class, and\n`header_size`'s [Pickle][pickle] object is 8 bytes.\n\nThe `header` is a JSON string, and the `header_size` is the size of `header`'s\n`Pickle` object.\n\nStructure of `header` is something like this:\n\n```json\n{\n   \"files\": {\n      \"tmp\": {\n         \"files\": {}\n      },\n      \"usr\" : {\n         \"files\": {\n           \"bin\": {\n             \"files\": {\n               \"ls\": {\n                 \"offset\": \"0\",\n                 \"size\": 100,\n                 \"executable\": true\n               },\n               \"cd\": {\n                 \"offset\": \"100\",\n                 \"size\": 100,\n                 \"executable\": true\n               }\n             }\n           }\n         }\n      },\n      \"etc\": {\n         \"files\": {\n           \"hosts\": {\n             \"offset\": \"200\",\n             \"size\": 32\n           }\n         }\n      }\n   }\n}\n```\n\n`offset` and `size` records the information to read the file from archive, the\n`offset` starts from 0 so you have to manually add the size of `header_size` and\n`header` to the `offset` to get the real offset of the file.\n\n`offset` is a UINT64 number represented in string, because there is no way to\nprecisely represent UINT64 in JavaScript `Number`. `size` is a JavaScript\n`Number` that is no larger than `Number.MAX_SAFE_INTEGER`, which has a value of\n`9007199254740991` and is about 8PB in size. We didn't store `size` in UINT64\nbecause file size in Node.js is represented as `Number` and it is not safe to\nconvert `Number` to UINT64.\n\n[pickle]: https://chromium.googlesource.com/chromium/src/+/master/base/pickle.h\n[node-pickle]: https://www.npmjs.org/package/chromium-pickle\n[grunt-asar]: https://github.com/bwin/grunt-asar\n","_attachments":{},"homepage":"https://github.com/electron/asar","bugs":{"url":"https://github.com/electron/asar/issues"},"license":"MIT"}