{"name":"lz4-wasm-nodejs","collaborators":["Pascal Seitz <pascal.seitz@gmail.com>"],"version":"0.7.3","main":"lz4_wasm_nodejs.js","types":"lz4_wasm_nodejs.d.ts","description":"<div align=\"center\">","_id":"lz4-wasm-nodejs@0.7.3","_nodeVersion":"12.20.2","_npmVersion":"6.14.11","dist":{"integrity":"sha512-09L6ia6jRhqD1DvXXTnoxe9JfzZF9Q9zFSM4Ib8zwlbmFsvU0LHraEYeQ5RrWzozj97YW1Rax7L4BcKVsU9IDQ==","shasum":"d53dd59fce89269dab385dc4a07ccb39a107d309","tarball":"http://registry-npm.ywwl.com/lz4-wasm-nodejs/download/lz4-wasm-nodejs-0.7.3.tgz","fileCount":5,"unpackedSize":29631,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgJnnOCRA9TVsSAnZWagAA4ZsP/R5Mt7PdHCNcPe/cIS4X\ntIdlYqlCRVQieXs2+q87a0JODz3u09+baqG7RNQvpYEv9lukhNBz6K3MjUeP\nMWR5xFkdpOTeKYwMDcpqEtav+V4PTJmOAgAB/nz2n0lCoQautk7lfjEsYcBZ\n9K9v96KF81wmgBBfDgTuoszePACOGvNn41ZlYxHC1zoQbtAzDCXwz598e5c8\nxDNU9fhSC2VS89fYBJfTIjaFWSFLUyrFEoceJl98YrMuwD+iOZfUy+3kIyDL\npxY0TfrRxQcHSYT3majCF0Bu2c3ippbteMMi000WadlEcEG2L7bhBXBLW+DE\na66HxKT9UiHzU7WoJ0Pl2hsNCVNUDh7rKZm92YcWNzI+TED8+vlKiB0cd+S8\npsEXyW1JBgR8Nc3oTxKzthDke1AlCZd3/vbE/+o6aT5HXnS4YV+EATLpyqYV\nCRichqHrgiVm8vaJd5ABFFHlSBfkouRlpzqLHXEt7o6H6V+3h2f5T5EkZFxl\nX9f9uda/AjrVNstI427NRg4dRWFRNWmT6HTCNL8wP4kpAkre2NuvUiEWl9Ya\nSkHoVCHDpN59BdzlFJdP3jRrkCSXG1jzsLEIaYHKzJ1vxzCZQPsx2Bdwif3K\n0QRSizP/DwpblUTSwQGOYkkQmlxdV0WZBf3pqz1kYg6KKHcidsIMgx1si301\ne0/k\r\n=W5vH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIQCzLcsAq4aTrVMjQ1bPx7fHrb6YWOuTVk7Qx6lyBI9bGQIfWQVRFnxAXUZauXYurT2l32N5mZt6csbWnorFDql8aQ=="}],"size":12505,"noattachment":false,"key":"/lz4-wasm-nodejs/-/lz4-wasm-nodejs-0.7.3.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.7.3_1613134286430_0.1196529847155321"},"_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":1613134286561,"_cnpm_publish_time":1613134286561,"dist-tags":{"latest":"0.9.2"}}