{"name":"lz4-wasm-nodejs","collaborators":["Pascal Seitz <pascal.seitz@gmail.com>"],"description":"High Performance lz4 wasm implementation","version":"0.7.4","license":"MIT","keywords":["compression","lz4","compress","decompression","decompress","wasm"],"main":"lz4_wasm_nodejs.js","types":"lz4_wasm_nodejs.d.ts","_id":"lz4-wasm-nodejs@0.7.4","_nodeVersion":"15.8.0","_npmVersion":"7.5.1","dist":{"integrity":"sha512-IfFZoNQdx6EOu7Zb9hfrxBvN7PEU30MdQccDMOUsBceUPPax+gjRJurQeJgMYyxmlVJDdpy8bTp2EIYTOYfJDA==","shasum":"aea6ebf4264f12f6b1010258e7400262821a120f","tarball":"http://registry-npm.ywwl.com/lz4-wasm-nodejs/download/lz4-wasm-nodejs-0.7.4.tgz","fileCount":7,"unpackedSize":40575,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgJvZ7CRA9TVsSAnZWagAA1bAP/RV6xe47KPaIJPb+pJVd\nO4A6RS6Q3giLabVeqb/fgIOhKSJnbWrPLnvUTiKRDfT7nsLaqcR+dvtwsYQ8\nmQLIEx2We5Tse++bmG6xuKTkicEk0OLYpmPN1c3Rf01lj0UzjI5Rna/z5lsi\nHMAoRuSPgmDqxjwUDKVY6OtuLlBAD+erwJDCLgbCGI7rumqYfXHGwbUTBhqx\n1JjoPlZnaeZD7L+KVS4D8wkNOz2kcf+tGEKsAR3Aj8RIzXA/dZb+A9Pucx+D\n9guNkjXL9cHtS3msTid9pWkRiZ0hIfC78mETYHypEijOS0Z9gxwoDlWu/kGn\ndaZcLsg2JNCnZ8axhebG0gPFGq2f0dHIBY99H7U7T5ep8rzKgxOAb3Ws2FTy\ngfcWbWjXekNYsrrVWeA8cv6afR1Ia2nPiwwTHnLNK4NNyzUiMOrlEkIMnwZW\npqpgKQ3eMvi8arvWvpgu6mXcIuB1h0HwHVawEha6tA3notHjvwWBCMkENkRj\nvKXIyDM6FzKSplUH/Bho1/asAq/dlskbTjs87/wX8JlG+ql+rRw7UzjFL494\nXnm7Vgvp+cM1CBwbvTOsERniLJNpgHTuF881ELka76XqwtUvVk8E0ghVWzB6\nvgz6+KnJSYPhAKxt1aX1dJDhm28sgmMBVuGErKj1CKndYqn1wvTJFXEfKZcT\nPCHa\r\n=8X8V\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDrh31jq+TZ19bsj78qdMTuikGmP5kjji/i3Oi2tUhHewIhANAr0OT6QayT0C8/+8/8oONNepEbGRzkM7PfL0A7LfgQ"}],"size":16785,"noattachment":false,"key":"/lz4-wasm-nodejs/-/lz4-wasm-nodejs-0.7.4.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.4_1613166202685_0.5554923674370815"},"_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":1613166202818,"_cnpm_publish_time":1613166202818,"dist-tags":{"latest":"0.9.2"}}