@jimbly/zopflipng-bin
v1.0.3
Published
`zopflipng` wrapper that makes it seamlessly available as a local dependency
Downloads
19
Maintainers
Readme
@jimbly/zopflipng-bin
This fork includes the binary dependencies without needing install scripts or run-time internet access. This fork includes the latest Win32 version which fixes an inability to read some files output by optipng.
Fork usage, in package.json:
"overrides": {
"zopflipng-bin": "npm:@jimbly/zopflipng-bin@^1.0.0"
}Original documentation below
zopfli Compression Algorithm is a new zlib (gzip, deflate) compatible compressor that takes more time (~100x slower), but compresses around 5% better than zlib and better than any other zlib-compatible compressor
You probably want imagemin-zopfli instead.
Install
$ npm install zopflipng-binUsage
import {execFile} from 'node:child_process';
import zopflipng from 'zopflipng-bin';
execFile(zopflipng, ['-m', '--lossy_8bit', 'input.png', 'outout.png'], () => {
console.log('Image minified!');
});CLI
$ npm install --global zopflipng-bin$ zopflipng --helpLicense
MIT © Imagemin
