
Security News
PEP 810 Proposes Explicit Lazy Imports for Python 3.15
An opt-in lazy import keyword aims to speed up Python startups, especially CLIs, without the ecosystem-wide risks that sank PEP 690.
@graphistry/node-pigz
Advanced tools
=== node-pigz by Graphistry, Inc. ===
Node-pigz wraps pigz for multicore compression. Pigz "is a fully functional replacement for gzip that exploits multiple processors and multiple cores to the hilt when compressing data." It is a great way to reduce latency, or, for the same latency, increase compression.
Node-pigz supports both JavaScript's ArrayBuffers (typed arrays) and Node's Buffer. The default wrapper takes Uint8Arrays and returns Buffers.
See github repo
node-pigz depends on pigz and node-gyp. It assumes pigz is at "/usr/local/bin/pigz".
See file LICENSE
See github repo
var compress = require('./compress.js');
var inputArr = [];
for (var i = 0; i < 1024 * 1024; i++) {
inputArr.push(i % 20);
}
var inputTypedArr = new Uint32Array(inputArr);
var t0 = new Date().getTime();
compress.deflate(new Uint8Array(inputTypedArr.buffer), function (err, outputBuffer) {
if (err) {
return console.error('Compression error', err);
} else {
console.log(
'deflated:', (inputTypedArr.byteLength/(1024*1024)).toFixed(2), 'MB',
'-->', (outputBuffer.length/(1024*1024)), 'MB');
console.log('(', (100 * outputBuffer.length/inputTypedArr.byteLength).toFixed(2), '%)');
console.log(new Date().getTime() - t0, 'ms');
}
});
// Output:
// deflated: 4.00 MB --> 0.027303695678710938 MB
// ( 0.68 %)
// 28 'ms'
FAQs
Multicore gzip/libz compression via a pig wrapper
The npm package @graphistry/node-pigz receives a total of 36 weekly downloads. As such, @graphistry/node-pigz popularity was classified as not popular.
We found that @graphistry/node-pigz demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 7 open source maintainers 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
An opt-in lazy import keyword aims to speed up Python startups, especially CLIs, without the ecosystem-wide risks that sank PEP 690.
Security News
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.