{"_id":"@eirslett/shoeset","_rev":"1-d26478f97b9617a5348d3382617d1576","name":"@eirslett/shoeset","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"@eirslett/shoeset","collaborators":["Eirik Sletteberg <eiriksletteberg@gmail.com>"],"description":"A 7z decompression library","version":"0.0.1","license":"MIT","repository":{"type":"git","url":"git+https://github.com/eirslett/shoeset.git"},"main":"shoeset.js","types":"shoeset.d.ts","bugs":{"url":"https://github.com/eirslett/shoeset/issues"},"homepage":"https://github.com/eirslett/shoeset#readme","_id":"@eirslett/shoeset@0.0.1","_nodeVersion":"14.4.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-tVvSfxsay7FM4JqWFDu++fZBn1tQfvE5t3DnoTaCXcIH4u9NL98lof+n/YMNpXCzFzOlLa49o+u4/CORuiecdw==","shasum":"a9bf17f9d92b21eed20bb2bb5940b61a9d1b2f12","tarball":"https://registry.npmjs.org/@eirslett/shoeset/-/shoeset-0.0.1.tgz","fileCount":7,"unpackedSize":165127,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfCycwCRA9TVsSAnZWagAAXSoP/RYdXo04vu5VUjqnyO8q\nEzhK/8OWkd3ER53ThlIArVjGAScGK0MHqRTvWrukT0uPDIWw9CQx2o0xS3/d\nCkW7QQrqZh6Lq5/h5nl65/6jxwQK/V8va16ANEBzFTf/8485JcaGeL3oNtKX\neieE6lFh2jAblMQAW2MnWu2Gogl1kbuVGqwr/IJA0pWAlze3oFesZZduDgFF\nLBCRRXO9v0dc0FaMtEPIU90OYxOK0AFgGz3eX92lqUOLcGUJAdVKgP6akN55\nacBuDeVG8TliH03noyZ6eUV/pd9r1BY0rBItmw3qqIjmLMZGYf6WrYsKGEsr\nxot5LuVxactzPRAYd78Ff8sK/US057maiwXjQb6NwSNH2vqFcT8neL4OxjFN\now3NB1RQVOdsXx4Af2yrslJlPZYup6iBQ6dpyMj4eAKH2H3NNCSY+Tz9PdfJ\nr+VAlrmIjUnwTtJyWa/4JeKeK5TWN3vVz/gNgZBRdKPZh2PFGQxeOwUUJcRc\njj8thD+egeECHF13MUPZ+5qctcpFh6hzO8Rdkv2hj2MM80T4y9z9Hr8/nClY\nILZQu61fjhws+f/2ezRcYdfBFdbLRRqPO8gFa1AZY0/b9FEeZCn5Nl+PfZOb\nXHprmqVVS/vJku9joUDJBrB/dO8xHnudi/YEJvafngEWsgO098AJupL5ELlq\nphaI\r\n=nN5H\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHH1lRSifksCS94JA73fxyqmE1ZWLy619bnpsXC+W5GlAiEAnZfW6NdUPxhtVOI1qgbOpBimf+Z28fIRwDUkXTtILPA="}]},"maintainers":[{"name":"eirslett","email":"eiriksletteberg@gmail.com"}],"_npmUser":{"name":"eirslett","email":"eiriksletteberg@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/shoeset_0.0.1_1594566448465_0.6747209128678482"},"_hasShrinkwrap":false}},"time":{"created":"2020-07-12T15:07:28.431Z","0.0.1":"2020-07-12T15:07:28.628Z","modified":"2022-04-05T07:00:35.706Z"},"maintainers":[{"name":"eirslett","email":"eiriksletteberg@gmail.com"}],"description":"A 7z decompression library","homepage":"https://github.com/eirslett/shoeset#readme","repository":{"type":"git","url":"git+https://github.com/eirslett/shoeset.git"},"bugs":{"url":"https://github.com/eirslett/shoeset/issues"},"license":"MIT","readme":"*WARNING:* This library is highly experimental, and may introduce breaking changes.\n\n# shoeset\n\nThis is a 7z archive decompressor, written in Rust.\nThe code is designed to be portable:\n\n- Run natively as a binary\n- Run as WebAssembly in a web browser or Node.js\n\nSupported decompression algorithms:\n- LZMA\n- LZMA2\n\nFeatures of 7z that are *not* supported:\n- Archive compression\n- CRC validation\n- Other decompression algorithms\n\nThe library is called \"shoeset\" because that's approximately how you pronounce \"7z\" in Norwegian.\n\n### Usage with JavaScript/WebAssembly\n\nInstallation:\n\n``\nnpm install @eirslett/shoeset\n``\n\nFrom Node.js:\n\n```\nimport * as shoeset from '@eirslett/shoeset';\nimport fs from 'fs';\n\nconst archive = fs.readFileSync('foobar.7z');\nconst decompressed = shoeset.default.decompress(archive);\nfor (const file of decompressed.files) {\n    console.log('name', file.name);\n    console.log('data', file.data);\n    \n    // If the file is UTF-8 encoded, we can log it as a string:\n    console.log(new TextDecoder().decode(file.data));\n}\n```\n\nFrom the browser:\n```\nconst js = import(`./node_modules/@eirslett/shoeset/shoeset.js`);\n\nfetch('/foobar.7z').then(async response => {\n    const data = await response.arrayBuffer();\n    const mod = await js;\n\n    const result = mod.decompress(new Uint8Array(data));\n\n    for (const file of result.files) {\n        console.log('name', file.name);\n        console.log('data', file.data);\n\n        // If the file is UTF-8 encoded, we can log it as a string:\n        console.log(new TextDecoder().decode(file.data));\n    }\n});\n```\n\n## Building\n\n1) Setup rust on your development machine, for example with [rustup](https://rustup.rs/).\n2) git clone this repository\n3) Run `cargo build` to build the native binary, or `./build-npm.sh` to build the npm package\n4) Run `cargo test` to run the unit tests, or `./test.sh` to test the npm package\n\n## Contributing\n\nJust send me a pull request. I cannot guarantee that I have time to review it, if there are many PRs.\n","readmeFilename":"README.md"}