Closed afwn90cj93201nixr2e1re closed 5 years ago
node-pngquant-native
is a native extension that takes and returns a Buffer
, whereas node-pngquant
shells out to an external binary and exposes itself as a transform stream.
node-pngquant-native
should have better performance as it doesn't incur the overhead of a child process per image, but on the other hand it looks like it blocks the event loop while quantizing the image, so YMMV.
The underlying libpngquant
code is the same, though, so you should end up with the same result whichever module you choose.
Both modules are rather old, but this one predates node-pngquant-native
by about half a year (Dec 2012 vs. June 2013).
What is difference with https://www.npmjs.com/package/node-pngquant-native package?