<commit_before># [node-pngcrush-bin](https://npmjs.org/package/pngcrush-bin) [![Build Status](https://travis-ci.org/1000ch/node-pngcrush-bin.png?branch=master)](https://travis-ci.org/1000ch/node-pngcrush-bin)

## About

[pngcrush](http://pmt.sourceforge.net/pngcrush/) Node.js wrapper that optimize PNG images.

> Pngcrush is an optimizer for PNG (Portable Network Graphics) files. It can be run from a commandline in an MSDOS window, or from a UNIX or LINUX commandline. 
> Its main purpose is to reduce the size of the PNG IDAT datastream by trying various compression levels an PNG filter methods. It also can be used to remove unwanted ancillary chunks, or to add certain chunks including gAMA, tRNS, iCCP, and textual chunks.

## Install

```sh
$ npm install -g pngcrush-bin
```

## Usage with Node.js

```js
var execFile = require('child_process').execFile;
var pngcrushPath = require('pngcrush-bin').path;

execFile(pngcrushPath, ['-reduce', '-brute', 'dest.png'], function() {
  console.log('Image minified');
});
```
<commit_msg>add nodeico<commit_after># [node-pngcrush-bin](https://npmjs.org/package/pngcrush-bin) [![Build Status](https://travis-ci.org/1000ch/node-pngcrush-bin.png?branch=master)](https://travis-ci.org/1000ch/node-pngcrush-bin)

## About

[pngcrush](http://pmt.sourceforge.net/pngcrush/) Node.js wrapper that optimize PNG images.

> Pngcrush is an optimizer for PNG (Portable Network Graphics) files. It can be run from a commandline in an MSDOS window, or from a UNIX or LINUX commandline. 
> Its main purpose is to reduce the size of the PNG IDAT datastream by trying various compression levels an PNG filter methods. It also can be used to remove unwanted ancillary chunks, or to add certain chunks including gAMA, tRNS, iCCP, and textual chunks.

[![NPM](https://nodei.co/npm/pngcrush-bin.png)](https://nodei.co/npm/pngcrush-bin/)

## Install

```sh
$ npm install -g pngcrush-bin
```

## Usage with Node.js

```js
var execFile = require('child_process').execFile;
var pngcrushPath = require('pngcrush-bin').path;

execFile(pngcrushPath, ['-reduce', '-brute', 'dest.png'], function() {
  console.log('Image minified');
});
```

{'fraction_non_alphanumeric': 0.1394163964798518, 'fraction_numerical': 0.007410838351088467, 'mean_word_length': 4.806451612903226, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '849036', 'n_tokens_mistral': 765, 'n_tokens_neox': 705, 'n_words': 216}