Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
jpegoptim-stream
Advanced tools
The pngquant command line utility as a readable/writable stream.
The constructor optionally takes an array of command line options for
the pngquant
binary (defaults to [256]
):
var PngQuant = require('pngquant'),
myPngQuanter = new PngQuant([192, '--quality', '60-80', '--nofs', '-']);
sourceStream.pipe(myPngQuanter).pipe(destinationStream);
PngQuant as a web service (sends back a png with the number of colors quantized to 128):
var PngQuant = require('pngquant'),
http = require('http');
http.createServer(function (req, res) {
if (req.headers['content-type'] === 'image/png') {
res.writeHead(200, {'Content-Type': 'image/png'});
req.pipe(new PngQuant([128])).pipe(res);
} else {
res.writeHead(400);
res.end('Feed me a PNG!');
}
}).listen(1337);
Make sure you have node.js and npm installed, and that the pngquant
binary is in your PATH, then run:
npm install pngquant
3-clause BSD license -- see the LICENSE
file for details.
v2.0.1 (2019-03-03)
FAQs
The jpegoptim utility as a readable/writable stream
The npm package jpegoptim-stream receives a total of 2 weekly downloads. As such, jpegoptim-stream popularity was classified as not popular.
We found that jpegoptim-stream 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
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.