Pathologic was missing because of a .git folder inside.
[yaffs-website] / node_modules / gzip-size / readme.md
1 # gzip-size [![Build Status](https://travis-ci.org/sindresorhus/gzip-size.svg?branch=master)](https://travis-ci.org/sindresorhus/gzip-size)
2
3 > Get the gzipped size of a string or buffer
4
5
6 ## Install
7
8 ```
9 $ npm install --save gzip-size
10 ```
11
12
13 ## Usage
14
15 ```js
16 var gzipSize = require('gzip-size');
17 var string = 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.';
18
19 console.log(string.length);
20 //=> 191
21
22 console.log(gzipSize.sync(string));
23 //=> 78
24 ```
25
26
27 ## API
28
29 ### gzipSize(input, callback)
30 ### gzipSize.sync(input)
31
32 #### input
33
34 Type: `string`, `buffer`
35
36 #### callback(error, size)
37
38 Type: `function`
39
40 ### gzipSize.stream()
41
42 Returns a passthrough stream. The stream emits a `gzip-size` event and has a `gzipSize` property.
43
44
45 ## Related
46
47 - [gzip-size-cli](https://github.com/sindresorhus/gzip-size-cli) - CLI for this module
48
49
50 ## License
51
52 MIT © [Sindre Sorhus](http://sindresorhus.com)