{"name":"lz4-wasm-nodejs","collaborators":["Pascal Seitz <pascal.seitz@gmail.com>"],"description":"High Performance lz4 wasm implementation","version":"0.9.2","license":"MIT","main":"lz4_wasm_nodejs.js","types":"lz4_wasm_nodejs.d.ts","keywords":["compression","lz4","compress","decompression","decompress","wasm"],"gitHead":"08ab363930b22745fdbf3c015224a1710d2c4369","_id":"lz4-wasm-nodejs@0.9.2","_nodeVersion":"17.8.0","_npmVersion":"8.5.5","dist":{"integrity":"sha512-hSwgJPS98q/Oe/89Y1OxzeA/UdnASG8GvldRyKa7aZyoAFCC8VPRtViBSava7wWC66WocjUwBpWau2rEmyFPsw==","shasum":"eaa3184ac048e1af9bd0ec82f89de8e8f158c6c7","tarball":"http://registry-npm.ywwl.com/lz4-wasm-nodejs/download/lz4-wasm-nodejs-0.9.2.tgz","fileCount":7,"unpackedSize":42143,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEMCICLk9fZT0LY/fn9LERVfFH3/FUoIH8vHAVgNV9CsxwToAh9AK6tvjRxnJI8Oxx43sMAHhBZql6kMbFKFdHR1+TeF"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiaPHIACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqi/w/9Gl2mg/d6gja1POonvVvIIwO3Trqs1xzvrV/e3DQVXm5ekv7g\r\nc+9WhCi+TQ+UiOvkMQ/jiC6/sLsLDRVgjEaUtdKrFmhNhC5QYngqYejgtm5r\r\nS7YzztXkUSvtcd5OvIdmioyTBv+MJ+LsOEg7pv8Wc4jZm0xoHGdxrooXm3Xk\r\nxISgOelgxNRXSaXhpAzziwjUFh9sXqPoiLkng6O7CmB8xBKzp3oPusMplwhj\r\nuORpfuuQQnEWcYbYd2cC/iBFGezWpB55E/v1Sp4bUOI+2ahmTFFWre8hLyQp\r\nsNR9xtob0VeOdMf6i1WcTFosbMUjoaEEJbUJ1qPknQVbqlL24Z3Vl1ammqUZ\r\nRUQWmYZnGB9Ip4Kr14MRULUJRP9u6NHzGB8k3m/OIZvyjiaGH9YMFmGSC985\r\ny8kRAamvVeO8yY3sPE23VjYvIGptiUa3KxQj9ajokSZDthxbqlMXo4yxZA/H\r\n5cJwne7lwjhgOiQS1KzjZ53Gm722Dy8MTPbRkTgJ/rxoejLCFDOv/CYDKbem\r\nFFfVafhuv3maFI+yWNlRlJ0qD8rKBVJaFaleP7g6SWyuYYjEhgUDuL/DIU6W\r\nVJx5SKaQ0r+mnWC5LJStDBbe7+2tVgAv3je3S3ZiRODvxt45KfK+gWg1KovM\r\nmeuo4dLzJiU7QDxQZ2+SaWzXR9VXqUwZg2g=\r\n=i5kc\r\n-----END PGP SIGNATURE-----\r\n","size":17104,"noattachment":false,"key":"/lz4-wasm-nodejs/-/lz4-wasm-nodejs-0.9.2.tgz"},"_npmUser":{"name":"pseitz","email":"pascal.seitz@gmail.com"},"directories":{},"maintainers":[{"name":"pseitz","email":"pascal.seitz@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lz4-wasm-nodejs_0.9.2_1651044808342_0.014204677067241711"},"_hasShrinkwrap":false,"readme":"<div align=\"center\">\n\n  <h1><code>lz4-wasm</code></h1>\n\n  <strong>Extremely fast compression(200MB/s Firefox, 350Mb/s Chrome) and decompression(600MB/s Firefox, 1400Mb/s Chrome) in the browser or nodejs using wasm.</strong>\n\n  <sub>Built with Rust</a></sub>\n</div>\n\n\n## 🚴 Usage\n\n\nThe wasm module exposes two function compress and decompress.\nBoth accept and return UInt8Array. \nInternally the lz4 block api is used, the length of the original input is prepended in 32-bit little endian.\n\n\n```\n\nimport * as wasm from \"lz4-wasm\";\n\n// use TextEncoder to get bytes (UInt8Array) from string\nvar enc = new TextEncoder();\nconst compressed = wasm.compress(enc.encode(\"compress this text, compress this text pls. thx. thx. thx. thx. thx\"));\nconst original = wasm.decompress(compressed);\n\nvar dec = new TextDecoder(\"utf-8\");\nalert(dec.decode(original))\n\n```\n\n\nSee https://github.com/PSeitz/lz4_flex/tree/master/lz4-wasm/example_project for usage and benchmark.\n\n\n## Making New Releases\n\n### Release for bundler\n\nBuild. This will optimize usage for inside a bundler like webpack.\n```\nRUST_LOG=info wasm-pack build --release\n```\n\nDue to a long standing bug in wasm-pack 0.9.1, _manually_ add these files to pkg/package.json.\n\n```\n    \"lz4_wasm_bg.wasm.d.ts\",\n```\n\n```\nRUST_LOG=info wasm-pack publish\n```\n\n\n### Release for nodejs\n\nset name in Cargo toml to\n```\nname = \"lz4-wasm-nodejs\"\n```\n\nBuild for nodejs\n```\nRUST_LOG=info wasm-pack build --release -t nodejs\n```\n\n```\nRUST_LOG=info wasm-pack publish\n```\n","publish_time":1651044808507,"_cnpm_publish_time":1651044808507,"dist-tags":{"latest":"0.9.2"}}