0.9.6 • Published 1 year ago

zopflipng v0.9.6

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

zopflipng

zopflipng is a native addon module of google's zopflipng.

!WARNING
Curently this package can only run on unix-like systems

!WARNING
Currently this package doesn't use pre-built binaries. It builds addon from source code while package is installed. Compilation process uses Cmake, Make or Ninja and GCC so these binaries should be in the path.

Install

npm install zopflipng

Example

npm install pngjs
import fs from "fs/promises";
import { optimize } from "zopflipng";

const pngContent = await fs.readFile(
  "node_modules/pngquantjs/assets/nodejs.png"
);
const options = {
  verbose: true,
  lossy_transparent: false,
  lossy_8bit: false,
  filter_strategies: [],
  auto_filter_strategy: true,
  keep_colortype: false,
  keepchunks: [],
  use_zopfli: true,
  num_iterations: 15,
  num_iterations_large: 5,
};
optimize(pngContent, options);

Contribution

Development

git clone https://github.com/diodeiot/zopflipng --recursive
cd zopflipng
yarn
yarn build

When contributing code, please write relevant tests and run npm test before submitting pull requests.

License

MIT

0.9.6

1 year ago

0.9.5

1 year ago

0.9.4

1 year ago

0.9.3

1 year ago

0.9.2

1 year ago

0.9.1

1 year ago

0.9.0

1 year ago