
Security News
Feross on TBPN: How North Korea Hijacked Axios
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.
inflate-raw
Advanced tools
decompress a raw DEFLATE buffer or stream in node and the browser
It uses a subset of pako in the browser which is smaller than using the zlib-browserify module.
Install - Usage - License: Apache-2.0
npm install inflate-raw
var inflateRaw = require('inflate-raw')
inflateRaw(compressedBuffer, function (err, uncompressedBuffer) {
})
var inflateRawStream = require('inflate-raw/stream')
someCompressedStream
.pipe(inflateRawStream())
.pipe(elsewhere)
var inflateRawWorker = require('inflate-raw/worker')
inflateRawWorker(compressedBuffer, function (err, uncompressedBuffer) {
})
In the browser, the main inflate-raw entry point is blocking, so if you inflate a very large buffer the browser may hang. You can use inflate-raw/worker instead which has the same API, but offloads the inflating to a Web Worker. Note that you cannot use compressedBuffer while inflation is in progress, because it is moved into the worker rather than copied. If you need to use the compressedBuffer, manually copy it first. After inflation, the compressedBuffer is moved back to the main thread, so you can use it again.
The inflate-raw/stream API is also synchronous but if the data comes streaming in in small chunks it will not noticeably lag the browser. It exposes a node-style stream transform interface.
FAQs
decompress a raw DEFLATE buffer or stream in node and the browser
The npm package inflate-raw receives a total of 2 weekly downloads. As such, inflate-raw popularity was classified as not popular.
We found that inflate-raw 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.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.

Security News
OpenSSF has issued a high-severity advisory warning open source developers of an active Slack-based campaign using impersonation to deliver malware.

Research
/Security News
Malicious packages published to npm, PyPI, Go Modules, crates.io, and Packagist impersonate developer tooling to fetch staged malware, steal credentials and wallets, and enable remote access.