{"name":"@andrewbranch/untar.js","version":"1.0.4","license":"MIT","description":"untar salvaged from bitjs","main":"lib/untar.js","types":"lib/untar.d.ts","scripts":{"prepublishOnly":"tsc"},"repository":{"type":"git","url":"git+https://github.com/andrewbranch/untar.js.git"},"exports":{".":{"import":"./lib/untar.mjs","default":"./lib/untar.js"},"./package.json":"./package.json"},"publishConfig":{"access":"public"},"devDependencies":{"typescript":"^5.0.0-dev.20230223"},"gitHead":"697a679691e6c9e146ceb64fcd36daf3ad71f20f","_id":"@andrewbranch/untar.js@1.0.4","bugs":{"url":"https://github.com/andrewbranch/untar.js/issues"},"homepage":"https://github.com/andrewbranch/untar.js#readme","_nodeVersion":"24.14.0","_npmVersion":"11.9.0","dist":{"integrity":"sha512-pVXSwPsLuw8IGLo2Di0EaOfsk+ntVvpkk942J/sHYIkwvtKUakEcPh7HBgZ6tuimgzKSEHgCvO4XgQ05DEbwDw==","shasum":"ad1c96bbaf2a30051104a18ca998ff578162f0c2","tarball":"http://registry-npm.ywwl.com/@andrewbranch/untar.js/download/@andrewbranch/untar.js-1.0.4.tgz","fileCount":8,"unpackedSize":10852,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDlKxBSH0IVsdelm5QbSrzfJlrkPyyV/is+E4HOT7PCSAIhAO236ucdc24q7wDwVo6Pab1m2vLxSe1LsO4XHw2A8Mly"}],"size":4058,"noattachment":false,"key":"/@andrewbranch/untar.js/-/@andrewbranch/untar.js-1.0.4.tgz"},"_npmUser":{"name":"andrewbranch","email":"andrew@wheream.io"},"directories":{},"maintainers":[{"name":"andrewbranch","email":"andrew@wheream.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/untar.js_1.0.4_1785954614453_0.7550226019834014"},"_hasShrinkwrap":false,"readme":"# untar.js\n\nHere's a simple pure-javascript implementation of untar (it's mostly taken verbatim from Jeff Schiller's bitjs, but no longer in a webworker— though ironically I'm making this in order to stick it back in a webworker, but I digress). \n\nHere's a basic usage, it seems to work alright. \n\n\tvar untar = require('untar.js');\n\tvar fs = require('fs');\n\n\tvar file = fs.readFileSync(__dirname + '/' + 'test.tar');\n\tuntar.untar(file).forEach(function(file){\n\t    console.log(file.filename, file.fileData.length);\n\t})\n\n\nIt's also possible to combine this with `pako` in order to decode tarballs\n\n\tvar untar = require('untar.js')\n\tvar pako = require('pako')\n\tvar fs = require('fs')\n\n\tvar unzipped = pako.inflate(fs.readFileSync(__dirname + '/' + 'with-5.0.0.tgz'));\n\n\tuntar.untar(unzipped).map(function(file){\n\t\tconsole.log(file.filename)\n\t})\n\nIt's pretty minimal as far as APIs go, it exposes a single method `untar` which can be passed an ArrayBuffer. It returns a list of `TarLocalFile` objects. The important fields are `size`, `filename`, and `fileData`. \n\n## Changelog\n\n* 0.2.3 — Fixing #2, thanks @jedie!\n* 0.2.2 — Fixing more decode bugs\n* 0.2.0 — Fixed a pretty major bug which led to decode errors from rounding to the wrong block. \n* 0.1.0 — Initial Release","publish_time":1785954614701,"_cnpm_publish_time":1785954614701,"dist-tags":{"latest":"1.0.4"}}