{"_id":"@thewtex/zstddec","_rev":"4-1655ab5d476d4d6136b370a64216f828","name":"@thewtex/zstddec","dist-tags":{"latest":"0.2.1"},"versions":{"0.1.0":{"name":"@thewtex/zstddec","version":"0.1.0","description":"ZSTD (Zstandard) decoder for Web and Node.js, using WebAssembly","repository":{"type":"git","url":"git+https://github.com/donmccurdy/zstddec.git"},"main":"dist/zstddec.js","module":"dist/zstddec.modern.js","source":"zstddec.ts","types":"dist/zstddec.d.ts","scripts":{"dist":"microbundle --format modern,cjs","watch":"microbundle watch --format modern,cjs","test":"npm run test:node && npm run test:browser","test:node":"tape *.test.js | tap-spec","test:browser":"browserify *.test.js | tape-run | tap-spec","preversion":"npm run dist && npm run test","postversion":"git push && git push --tags && npm publish"},"keywords":["zstd","zstandard","compression"],"author":{"name":"Don McCurdy","email":"dm@donmccurdy.com"},"license":"MIT AND BSD-3-Clause","devDependencies":{"browserify":"^16.5.1","microbundle":"^0.15.1","tap-spec":"^5.0.0","tape":"^5.0.1","tape-run":"^10.0.0"},"gitHead":"501c65a65a182e0749f87caf95431dab07c22de1","bugs":{"url":"https://github.com/donmccurdy/zstddec/issues"},"homepage":"https://github.com/donmccurdy/zstddec#readme","_id":"@thewtex/zstddec@0.1.0","_nodeVersion":"18.17.1","_npmVersion":"9.6.7","dist":{"integrity":"sha512-7pq3PWDoJdgtp+y77mJs1mRo1rFaC6LcPTuzZc2rHPoxPK2FbJxhXZJEKFURqr5gaoRuzJcrkOBT9q6zQCPwVw==","shasum":"28e99b4ddeeb9d67609406d71bda7e15ec007026","tarball":"https://registry.npmjs.org/@thewtex/zstddec/-/zstddec-0.1.0.tgz","fileCount":9,"unpackedSize":462298,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCo/Sh1hrT1suYPy4KHD5QVgVMLANiF+rSizotSnBIjCQIhAIM8kztPfdf2bg9Oizz6h5oEWZ6bRCye7vENCTzJiJcY"}]},"_npmUser":{"name":"thewtex","email":"matt@mmmccormick.com"},"directories":{},"maintainers":[{"name":"thewtex","email":"matt@mmmccormick.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/zstddec_0.1.0_1694003007551_0.9103804502231505"},"_hasShrinkwrap":false},"0.1.1":{"name":"@thewtex/zstddec","version":"0.1.1","description":"ZSTD (Zstandard) decoder for Web and Node.js, using WebAssembly","repository":{"type":"git","url":"git+https://github.com/donmccurdy/zstddec.git"},"type":"module","exports":{"types":"dist/zstddec.d.ts","require":"./dist/zstddec.cjs","default":"./dist/zstddec.modern.js"},"main":"dist/zstddec.cjs","module":"dist/zstddec.modern.js","source":"zstddec.ts","types":"dist/zstddec.d.ts","scripts":{"dist":"microbundle --format modern,cjs","watch":"microbundle watch --format modern,cjs","test":"npm run test:node && npm run test:browser","test:node":"tape *.test.cjs | tap-spec","test:browser":"browserify *.test.cjs | tape-run | tap-spec","preversion":"npm run dist && npm run test","postversion":"git push && git push --tags && npm publish"},"keywords":["zstd","zstandard","compression"],"author":{"name":"Don McCurdy","email":"dm@donmccurdy.com"},"license":"MIT AND BSD-3-Clause","devDependencies":{"browserify":"^16.5.1","microbundle":"^0.15.1","tap-spec":"^5.0.0","tape":"^5.0.1","tape-run":"^10.0.0"},"gitHead":"183f9214b5cc93d41d594cc7f8c31348f371e89a","bugs":{"url":"https://github.com/donmccurdy/zstddec/issues"},"homepage":"https://github.com/donmccurdy/zstddec#readme","_id":"@thewtex/zstddec@0.1.1","_nodeVersion":"18.17.1","_npmVersion":"9.6.7","dist":{"integrity":"sha512-evgVH1iKPzR4s2tqZNNQvoZXLrzFocm58VEnje/8f63GO8OxY/XXJRJXG+zfnA8GcLTpxAZvpaAvfwL5OGuPGQ==","shasum":"d9724474ebfb8fbcd9eebd22951857c30b2102ca","tarball":"https://registry.npmjs.org/@thewtex/zstddec/-/zstddec-0.1.1.tgz","fileCount":9,"unpackedSize":460200,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHyIHWkp+bTODw7CCTUeYe+W/VloAuz8hvvIRfS07P2dAiEAmIxc804L+t0vCAP3DgTZZ/92z2GG9DY5RoZdKuM+pOc="}]},"_npmUser":{"name":"thewtex","email":"matt@mmmccormick.com"},"directories":{},"maintainers":[{"name":"thewtex","email":"matt@mmmccormick.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/zstddec_0.1.1_1694012009033_0.9780930588714187"},"_hasShrinkwrap":false},"0.1.2":{"name":"@thewtex/zstddec","version":"0.1.2","description":"ZSTD (Zstandard) decoder for Web and Node.js, using WebAssembly","repository":{"type":"git","url":"git+https://github.com/thewtex/zstddec-wasm.git"},"type":"module","exports":{"types":"dist/zstddec.d.ts","require":"./dist/zstddec.cjs","default":"./dist/zstddec.modern.js"},"main":"dist/zstddec.cjs","module":"dist/zstddec.modern.js","source":"zstddec.ts","types":"dist/zstddec.d.ts","scripts":{"dist":"microbundle --format modern,cjs","watch":"microbundle watch --format modern,cjs","test":"npm run test:node && npm run test:browser","test:node":"tape *.test.cjs | tap-spec","test:browser":"browserify *.test.cjs | tape-run | tap-spec","preversion":"npm run dist && npm run test","postversion":"git push && git push --tags && npm publish"},"keywords":["zstd","zstandard","compression"],"author":{"name":"Don McCurdy","email":"dm@donmccurdy.com"},"license":"MIT AND BSD-3-Clause","devDependencies":{"browserify":"^16.5.1","microbundle":"^0.15.1","tap-spec":"^5.0.0","tape":"^5.0.1","tape-run":"^10.0.0"},"gitHead":"010cb25f5de87d4b1eb122efe2836bb1e129afc2","bugs":{"url":"https://github.com/thewtex/zstddec-wasm/issues"},"homepage":"https://github.com/thewtex/zstddec-wasm#readme","_id":"@thewtex/zstddec@0.1.2","_nodeVersion":"18.17.1","_npmVersion":"9.6.7","dist":{"integrity":"sha512-Bv50pouFqlmIZDcAA2Nrpk9tjJpAPlqHHeD5h0noK+oNXMimrZ/hMbJK2N09Svr6TI/S6nT63dzkWoim4ZzTuw==","shasum":"33abeb1b9c6c1f7dca04aa1761c0471e3f493c85","tarball":"https://registry.npmjs.org/@thewtex/zstddec/-/zstddec-0.1.2.tgz","fileCount":9,"unpackedSize":460202,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCCJUg2/OxT9Bd4RnNrqq7x2TilEi1DdqDogNA44y5spAIgN3FRVg6bvPl8/HduMdQQCXhlTH8h7/OYTilHSCG2+J4="}]},"_npmUser":{"name":"thewtex","email":"matt@mmmccormick.com"},"directories":{},"maintainers":[{"name":"thewtex","email":"matt@mmmccormick.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/zstddec_0.1.2_1694012198414_0.1921680104612402"},"_hasShrinkwrap":false},"0.2.0":{"name":"@thewtex/zstddec","version":"0.2.0","description":"ZSTD (Zstandard) decoder for Web and Node.js, using WebAssembly","repository":{"type":"git","url":"git+https://github.com/donmccurdy/zstddec.git"},"type":"module","sideEffects":false,"source":"zstddec.ts","types":"./dist/zstddec.d.ts","main":"./dist/zstddec.cjs","module":"./dist/zstddec.esm.js","exports":{"types":"./dist/zstddec.d.ts","require":"./dist/zstddec.cjs","default":"./dist/zstddec.modern.js"},"scripts":{"dist":"microbundle --format modern,esm,cjs --no-compress","watch":"microbundle watch --format modern,esm,cjs --no-compress","test":"npm run test:node && npm run test:browser","test:node":"tape *.test.cjs | tap-spec","test:browser":"browserify *.test.cjs | tape-run | tap-spec","preversion":"rimraf dist/* && npm run dist && npm run test","postversion":"git push && git push --tags && npm publish"},"keywords":["zstd","zstandard","compression"],"author":{"name":"Don McCurdy","email":"dm@donmccurdy.com"},"license":"MIT AND BSD-3-Clause","devDependencies":{"browserify":"^17.0.0","microbundle":"^0.15.1","rimraf":"^5.0.5","tap-spec":"^5.0.0","tape":"^5.7.0","tape-run":"^11.0.0"},"gitHead":"239158ed4752f4e8f307f30b4b66a190de537b6b","bugs":{"url":"https://github.com/donmccurdy/zstddec/issues"},"homepage":"https://github.com/donmccurdy/zstddec#readme","_id":"@thewtex/zstddec@0.2.0","_nodeVersion":"18.17.1","_npmVersion":"9.6.7","dist":{"integrity":"sha512-lIS+smrfa48WGlDVQSQSm0jBnwVp5XmfGJWU9q0J0fRFY9ohzK4s27Zg2SFMb1NWMp9RiANAdK+/q86EBGWR1Q==","shasum":"a56ba37dac0a2c2dfc4481da231df3bf2fff8740","tarball":"https://registry.npmjs.org/@thewtex/zstddec/-/zstddec-0.2.0.tgz","fileCount":11,"unpackedSize":361314,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC3BTltwNl13hDmP4gRvjQgp92IwAcggtfsWWEGqtgZOAIhAJ6EbGLydPz4fauY7e2f2ALWc0245xNJ1MpJhHGbJhfZ"}]},"_npmUser":{"name":"thewtex","email":"matt@mmmccormick.com"},"directories":{},"maintainers":[{"name":"thewtex","email":"matt@mmmccormick.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/zstddec_0.2.0_1698278509260_0.672026014188897"},"_hasShrinkwrap":false},"0.2.1":{"name":"@thewtex/zstddec","version":"0.2.1","description":"ZSTD (Zstandard) decoder for Web and Node.js, using WebAssembly","repository":{"type":"git","url":"git+https://github.com/donmccurdy/zstddec.git"},"sideEffects":false,"type":"module","source":"zstddec.ts","types":"./dist/zstddec.d.ts","main":"./dist/zstddec.cjs","module":"./dist/zstddec.esm.js","exports":{"types":"./dist/zstddec.d.ts","require":"./dist/zstddec.cjs","default":"./dist/zstddec.modern.js"},"scripts":{"dist":"microbundle --format modern,esm,cjs --no-compress","watch":"microbundle watch --format modern,esm,cjs --no-compress","test":"npm run test:node && npm run test:browser","test:node":"tape *.test.cjs | tap-spec","test:browser":"browserify *.test.cjs | tape-run | tap-spec","preversion":"rimraf dist/* && npm run dist && npm run test","postversion":"git push && git push --tags && npm publish"},"keywords":["zstd","zstandard","compression"],"author":{"name":"Don McCurdy","email":"dm@donmccurdy.com"},"license":"MIT AND BSD-3-Clause","devDependencies":{"browserify":"^17.0.0","microbundle":"^0.15.1","rimraf":"^5.0.5","tap-spec":"^5.0.0","tape":"^5.7.0","tape-run":"^11.0.0"},"_id":"@thewtex/zstddec@0.2.1","gitHead":"b7139e3c1b225c44ed8afb7fc1a51953ef8f9ed1","bugs":{"url":"https://github.com/donmccurdy/zstddec/issues"},"homepage":"https://github.com/donmccurdy/zstddec#readme","_nodeVersion":"20.12.2","_npmVersion":"10.5.0","dist":{"integrity":"sha512-1yTu7m/qU1nsJy4mCZAB3GAhczsClhw+WIXK0oe598eHcvefH16WLOYN4Uko7K2/Ttz9KEBvvT7WFrZD41ShgA==","shasum":"c953df9b0d6c941f8017eb0df255b1fb3e22de14","tarball":"https://registry.npmjs.org/@thewtex/zstddec/-/zstddec-0.2.1.tgz","fileCount":11,"unpackedSize":361294,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEMCIGUsA5+96q/5PNEEQcIYEeu3dlHaxyl1o05UNRp8kPcFAh8pLHpAOjPGXCkS2VEB8TbEVmOV3OwI78pBOkl7OmrD"}]},"_npmUser":{"name":"thewtex","email":"matt@mmmccormick.com"},"directories":{},"maintainers":[{"name":"thewtex","email":"matt@mmmccormick.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/zstddec_0.2.1_1713540786927_0.7586864046177995"},"_hasShrinkwrap":false}},"time":{"created":"2023-09-06T12:23:27.437Z","0.1.0":"2023-09-06T12:23:27.806Z","modified":"2024-04-19T15:33:07.367Z","0.1.1":"2023-09-06T14:53:29.320Z","0.1.2":"2023-09-06T14:56:38.705Z","0.2.0":"2023-10-26T00:01:49.608Z","0.2.1":"2024-04-19T15:33:07.210Z"},"maintainers":[{"name":"thewtex","email":"matt@mmmccormick.com"}],"description":"ZSTD (Zstandard) decoder for Web and Node.js, using WebAssembly","homepage":"https://github.com/donmccurdy/zstddec#readme","keywords":["zstd","zstandard","compression"],"repository":{"type":"git","url":"git+https://github.com/donmccurdy/zstddec.git"},"author":{"name":"Don McCurdy","email":"dm@donmccurdy.com"},"bugs":{"url":"https://github.com/donmccurdy/zstddec/issues"},"license":"MIT AND BSD-3-Clause","readme":"# zstddec\n\n[![Latest NPM release](https://img.shields.io/npm/v/zstddec.svg)](https://www.npmjs.com/package/zstddec)\n[![Minzipped size](https://badgen.net/bundlephobia/minzip/zstddec)](https://bundlephobia.com/result?p=zstddec)\n[![Build Status](https://github.com/donmccurdy/zstddec/workflows/build/badge.svg?branch=main&event=push)](https://github.com/donmccurdy/zstddec/actions?query=workflow%3Abuild)\n\n[ZSTD (Zstandard)](https://github.com/facebook/zstd) decoder for Web and Node.js, using WebAssembly.\n\n## Installation\n\n```shell\nnpm install --save zstddec\n```\n\n## API\n\n```javascript\nimport { ZSTDDecoder } from 'zstddec';\n\nconst decoder = new ZSTDDecoder();\n\nawait decoder.init();\n\nconst decompressedArray = decoder.decode( compressedArray, uncompressedSize );\n```\n\n> **Limitations:** The decoder may fail with the error `wasm function signature contains illegal type` when the `uncompressedSize` is not known in advance and given to the `decode()` method. This is presumably a bug in the WASM bindings, which I am not yet sure how to fix.\n\n## Contributing\n\nTo build the project locally, run:\n\n```\nnpm install\nnpm run dist\n```\n\nTo test changes:\n\n```\nnpm test\n```\n\n## Building from source\n\nCompiled from https://github.com/facebook/zstd/tree/dev/build/single_file_libs, with the\nfollowing steps:\n\n```shell\n./create_single_file_decoder.sh\n```\n\n> **Note**\nThe current build is based on zstd v1.5.0. The binary sized increased\nfollowing this version.\n\n```shell\nemcc zstddeclib.c -s EXPORTED_FUNCTIONS=\"['_ZSTD_decompress', '_ZSTD_findDecompressedSize', '_ZSTD_isError', '_malloc', '_free']\"  -Wl,--no-entry -s WASM=1 -Oz -g0 -flto -s ALLOW_MEMORY_GROWTH=1 -s FILESYSTEM=0 -s STANDALONE_WASM=1 -DNDEBUG=1 -s PURE_WASI=0 -o zstddec.wasm\nbase64 -w 0 zstddec.wasm > zstddec.txt\n```\n\n> **Note**\nThe `-w 0` argument is only for the `base64` shipped on Linux systems -- on macOS this should be omitted.\n\nThe base64 string written to `zstddec.txt` is embedded as the `wasm` variable at the bottom\nof the source file. The rest of the file is written by hand, in order to avoid an additional JS\nwrapper generated by Emscripten.\n\n## License\n\nJavaScript wrapper is provided under the MIT License, and the WASM ZSTD decoder is provided by Facebook under the BSD 3-Clause License.\n","readmeFilename":"README.md"}