{"_id":"pako@3.0.3","bugs":{"url":"https://github.com/nodeca/pako/issues"},"dist":{"shasum":"c8cc604432e09f01a505abc2dbd3800db71a17d5","tarball":"http://registry-npm.ywwl.com/pako/download/pako-3.0.3.tgz","fileCount":20,"integrity":"sha512-tmrebBBYI5FOw8QICGwJNqE8fotC8R+gwcxOvoFNv+GKehOI6Lc6YBolNcQNnC4v96l1wt7rh102ifD4kVeZAQ==","signatures":[{"sig":"MEUCIQCh6G0lNRsbbT1fbs9gpiV7qdZ3kbzf6KJ+dKF2pG0P8wIgRMlNPMh35cLYaRhATWqt4XfCe+e/kF+FiluRPDlYVP4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDpyuYj7WtdE5zAZ+OpoW4JTR7tFqRMvx0nYgHuCL9ZAgIhAP/wM/X2trJSQXKxR+BmEvx7RkHh/+CwqkcgiUrBYU7P"}],"unpackedSize":2500536,"size":604043,"noattachment":false,"key":"/pako/-/pako-3.0.3.tgz"},"main":"./dist/pako.cjs.js","name":"pako","types":"./dist/pako.d.ts","module":"./dist/pako.mjs","exports":{".":{"types":"./dist/pako.d.ts","import":"./dist/pako.mjs","require":"./dist/pako.cjs.js"},"./browser":{"types":"./dist/pako.d.ts","import":"./dist/browser/pako.esm.min.mjs","default":"./dist/browser/pako.umd.min.js","require":"./dist/browser/pako.umd.min.js"},"./package.json":"./package.json","./browser/deflate":{"types":"./dist/pako.d.ts","import":"./dist/browser/pako_deflate.esm.min.mjs","default":"./dist/browser/pako_deflate.umd.min.js","require":"./dist/browser/pako_deflate.umd.min.js"},"./browser/inflate":{"import":"./dist/browser/pako_inflate.esm.min.mjs","default":"./dist/browser/pako_inflate.umd.min.js","require":"./dist/browser/pako_inflate.umd.min.js"}},"funding":[{"url":"https://github.com/sponsors/puzrin","type":"github"},{"url":"https://github.com/sponsors/nodeca","type":"github"}],"gitHead":"d0101a9cf08e5260d962e47d1a095f530231e61d","license":"(MIT AND Zlib)","scripts":{"doc":"typedoc","lint":"eslint .","test":"npm run lint && npm run build && npm run type-check && node --test","build":"node support/build-dist.mjs","gh-doc":"npm run doc && gh-pages -d doc -f","prepack":"npm test && npm run build && npm run doc","coverage":"npm run lint && c8 -r text -r html node --test","type-check":"tsc --noEmit","postpublish":"npm run gh-doc","build_fixtures":"node support/build_fixtures.mjs"},"version":"3.0.3","_npmUser":{"name":"vitaly","email":"vitaly@rcopen.com"},"homepage":"https://github.com/nodeca/pako#readme","keywords":["zlib","deflate","inflate","gzip"],"repository":{"url":"git+https://github.com/nodeca/pako.git","type":"git"},"_npmVersion":"11.20.0","description":"zlib port to javascript - fast, modularized, with browser support","directories":{},"maintainers":[{"name":"vitaly","email":"vitaly@rcopen.com"}],"_nodeVersion":"26.12.0","contributors":[{"url":"https://github.com/andr83","name":"Andrei Tuputcyn"},{"url":"https://github.com/puzrin","name":"Vitaly Puzrin"},{"url":"https://github.com/dignifiedquire","name":"Friedel Ziegelmayer"},{"url":"https://github.com/Kirill89","name":"Kirill Efimov"},{"name":"Jean-loup Gailly"},{"name":"Mark Adler"}],"_hasShrinkwrap":false,"devDependencies":{"c8":"^11.0.0","vite":"^8.0.14","eslint":"^9.39.4","rollup":"^4.62.2","typedoc":"^0.28.19","gh-pages":"^6.3.0","typescript":"^6.0.3","@types/node":"^26.0.0","neostandard":"^0.13.0","rollup-plugin-dts":"^6.4.1"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pako_3.0.3_1793048641237_0.9960569207586369"},"readme":"pako\n==========================================\n\n[![CI](https://github.com/nodeca/pako/workflows/CI/badge.svg)](https://github.com/nodeca/pako/actions)\n[![NPM version](https://img.shields.io/npm/v/pako.svg)](https://www.npmjs.org/package/pako)\n\n> Very fast zlib-compatible compression for JavaScript.\n\n## Why pako is cool\n\n- __Binary-equivalent output.__ Pako can produce the same deflate/gzip bytes as\n  original [zlib](http://www.zlib.net/) (1.3.2) and Node.js' patched zlib.\n- __Tiny browser bundles.__ Full minified bundle is under 15K gzipped.\n  Deflate-only and inflate-only builds are smaller.\n- __Very fast.__ Performance is comparable with native zlib in modern JavaScript\n  engines (see benchmarks).\n\n\n## Benchmarks\n\nnode v24, 1 MB input sample:\n\n```\ndeflate-pako x 14.27 ops/sec ±3.41% (37 runs sampled)\ndeflate-pako-zlib-hash x 10.60 ops/sec ±0.50% (29 runs sampled)\ndeflate-zlib x 30.30 ops/sec ±0.61% (51 runs sampled)\ngzip-pako x 13.48 ops/sec ±0.50% (36 runs sampled)\ninflate-pako x 138 ops/sec ±1.26% (75 runs sampled)\ninflate-zlib x 397 ops/sec ±1.37% (81 runs sampled)\nungzip-pako x 125 ops/sec ±1.46% (73 runs sampled)\n```\n\n\n## Install\n\n```\nnpm install pako\n```\n\n> [!NOTE]\n> For a quick look at `dist/` folder contents, see\n> <https://unpkg.com/pako@latest/>.\n\n\nExamples / API\n--------------\n\nFull docs - http://nodeca.github.io/pako/\n\n```javascript\nimport { Deflate, Inflate, deflate, inflate } from 'pako';\n\n// Deflate\n//\nconst input = new Uint8Array();\n//... fill input data here\nconst output = deflate(input);\n\n// Inflate (simple wrapper can throw exception on broken stream)\n//\nconst compressed = new Uint8Array();\n//... fill data to uncompress here\ntry {\n  const result = inflate(compressed);\n  // ... continue processing\n} catch (err) {\n  console.log(err);\n}\n\n//\n// Alternate interface for chunking & without exceptions\n//\n\nconst deflator = new Deflate();\n\ndeflator.push(chunk1, false);\ndeflator.push(chunk2); // second param is false by default.\n...\ndeflator.push(chunk_last, true); // `true` says this chunk is last\n\nif (deflator.err) {\n  console.log(deflator.msg);\n}\n\nconst output = deflator.result;\n\n\nconst inflator = new Inflate();\n\ninflator.push(chunk1);\ninflator.push(chunk2);\n...\ninflator.push(chunk_last); // no second param because end is auto-detected\n\nif (inflator.err) {\n  console.log(inflator.msg);\n}\n\nconst output = inflator.result;\n```\n\nFor CommonJS:\n\n```javascript\nconst { deflate, inflate } = require('pako');\n```\n\nIf you need the whole API as an object, use namespace import:\n\n```javascript\nimport * as pako from 'pako';\n```\n\nSometimes you may wish to work with strings — for example, to send\nstringified objects to a server. Pako's deflate detects the input data type and\nautomatically recodes strings to utf-8 prior to compression. High-level inflate\nhelpers can decode utf-8 output back to JavaScript strings with `toText: true`.\n\n```javascript\nimport { deflate, inflate } from 'pako';\n\nconst test = { my: 'super', puper: [456, 567], awesome: 'pako' };\n\nconst compressed = deflate(JSON.stringify(test));\n\nconst restored = JSON.parse(inflate(compressed, { toText: true }));\n```\n\n\n## Notes\n\nPako does not contain some specific zlib functions:\n\n- __deflate__ -  methods `deflateCopy`, `deflateBound`, `deflateParams`,\n  `deflatePending`, `deflatePrime`, `deflateTune`.\n- __inflate__ - methods `inflateCopy`, `inflateMark`,\n  `inflatePrime`, `inflateGetDictionary`, `inflateSync`, `inflateSyncPoint`, `inflateUndermine`.\n- High level inflate/deflate wrappers (classes) may not support some flush\n  modes.\n\n\n## Authors\n\n- Andrey Tupitsin [@anrd83](https://github.com/andr83)\n- Vitaly Puzrin [@puzrin](https://github.com/puzrin)\n\nPersonal thanks to:\n\n- Vyacheslav Egorov ([@mraleph](https://github.com/mraleph)) for his awesome\n  tutorials about optimising JS code for v8, [IRHydra](http://mrale.ph/irhydra/)\n  tool and his advices.\n- David Duponchel ([@dduponchel](https://github.com/dduponchel)) for help with\n  testing.\n\nOriginal implementation (in C):\n\n- [zlib](http://zlib.net/) by Jean-loup Gailly and Mark Adler.\n\n\n## License\n\n- MIT - all files, except `/src/zlib` folder\n- ZLIB - `/src/zlib` content\n","publish_time":1793048641372,"_cnpm_publish_time":1793048641372,"dist-tags":{"latest":"3.0.3"}}