
Research
Malicious fezbox npm Package Steals Browser Passwords from Cookies via Innovative QR Code Steganographic Technique
A malicious package uses a QR code as steganography in an innovative technique.
lz4-wasm-nodejs
Advanced tools
lz4-wasm
Extremely fast compression(200MB/s Firefox, 350Mb/s Chrome) and decompression(600MB/s Firefox, 1400Mb/s Chrome) in the browser or nodejs using wasm.
Built with Rust
The wasm module exposes two function compress and decompress. Both accept and return UInt8Array. Internally the lz4 block api is used, the length of the original input is prepended in 32-bit little endian.
import * as wasm from "lz4-wasm";
// use TextEncoder to get bytes (UInt8Array) from string
var enc = new TextEncoder();
const compressed = wasm.compress(enc.encode("compress this text, compress this text pls. thx. thx. thx. thx. thx"));
const original = wasm.decompress(compressed);
var dec = new TextDecoder("utf-8");
alert(dec.decode(original))
See https://github.com/PSeitz/lz4_flex/tree/master/lz4-wasm/example_project for usage and benchmark.
Build. This will optimize usage for inside a bundler like webpack.
RUST_LOG=info wasm-pack build --release
Due to a long standing bug in wasm-pack 0.9.1, manually add these files to package.json.
"lz4_wasm_bg.wasm.d.ts",
"lz4_wasm_bg.js",
RUST_LOG=info wasm-pack publish
set name in Cargo toml to
name = "lz4-wasm-nodejs"
Build for nodejs
RUST_LOG=info wasm-pack build --release -t nodejs
RUST_LOG=info wasm-pack publish
FAQs
High Performance lz4 wasm implementation
The npm package lz4-wasm-nodejs receives a total of 1,410 weekly downloads. As such, lz4-wasm-nodejs popularity was classified as popular.
We found that lz4-wasm-nodejs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.
Application Security
/Research
/Security News
Socket detected multiple compromised CrowdStrike npm packages, continuing the "Shai-Hulud" supply chain attack that has now impacted nearly 500 packages.