You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

readme.md 1.1KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. # zopflipng-bin [![Build Status](https://travis-ci.org/imagemin/zopflipng-bin.svg?branch=master)](https://travis-ci.org/imagemin/zopflipng-bin) [![Windows Build Status](https://img.shields.io/appveyor/ci/ShinnosukeWatanabe/zopflipng-bin/master.svg?label=Windows%20build)](https://ci.appveyor.com/project/ShinnosukeWatanabe/zopflipng-bin/branch/master)
  2. > [zopfli](https://github.com/google/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
  3. You probably want [`imagemin-zopfli`](https://github.com/imagemin/imagemin-zopfli) instead.
  4. ## Install
  5. ```
  6. $ npm install zopflipng-bin
  7. ```
  8. ## Usage
  9. ```js
  10. const {execFile} = require('child_process');
  11. const zopflipng = require('zopflipng-bin');
  12. execFile(zopflipng, ['-m', '--lossy_8bit', 'input.png', 'outout.png'], () => {
  13. console.log('Image minified!');
  14. });
  15. ```
  16. ## CLI
  17. ```
  18. $ npm install --global zopflipng-bin
  19. ```
  20. ```
  21. $ zopflipng --help
  22. ```
  23. ## License
  24. MIT © [Imagemin](https://github.com/imagemin)