* Fix workflow * Trigger * [auto] Update compiled version * [auto] Commit modules * Push Windows changes * Fix * [auto] Update compiled version * Try removing cwd * [auto] Update compiled version * Try with path module * [auto] Update compiled version * Fix path * [auto] Update compiled version * Use raw path * [auto] Update compiled version * Other path * [auto] Update compiled version * Avoid @action/exec * [auto] Update compiled version * test * [auto] Update compiled version * test * [auto] Update compiled version * test * [auto] Update compiled version * test * [auto] Update compiled version * Try with shelljs * [auto] Update compiled version * Fix my stupidity * Copy scripts to local dir * [auto] Update compiled version * Still use path * [auto] Update compiled version * Delete entrypoint.sh * [auto] Update compiled version * Make file executable * [auto] Update compiled version * Try using bash * [auto] Update compiled version
gzip-size 
Get the gzipped size of a string or buffer
Install
$ npm install gzip-size
Usage
const gzipSize = require('gzip-size');
const text = '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.';
console.log(text.length);
//=> 191
console.log(gzipSize.sync(text));
//=> 78
API
gzipSize(input, [options])
Returns a Promise for the size.
gzipSize.sync(input, [options])
Returns the size.
input
Type: string Buffer
options
Type: Object
Any zlib option.
gzipSize.stream([options])
Returns a stream.PassThrough. The stream emits a gzip-size event and has a gzipSize property.
gzipSize.file(path, [options])
Returns a Promise for the size of the file.
path
Type: string
gzipSize.fileSync(path, [options])
Returns the size of the file.
Related
- gzip-size-cli - CLI for this module
License
MIT © Sindre Sorhus