4.0.0 • Published 6 years ago

brotli-size v4.0.0

Weekly downloads
296,048
License
MIT
Repository
github
Last release
6 years ago

brotli-size

Get the brotli compressed size of a string or buffer.

Install

$ npm install --save brotli-size

Usage

var brotliSize = require('brotli-size');
var str = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam feugiat, mauris non aliquam pretium, libero nulla ultrices lacus, nec varius est purus sit amet dolor.';

console.log(str.length); // 165

console.log(brotliSize.sync(str)); // 118

API

brotliSize.sync(input)

input

Type: string, buffer

brotliSize.stream()

Returns a passthrough stream. The stream emits a brotli-size event and has a brotliSize property.

Related

  • gzip-size - Heavily inspired by this module. Thank you for the inspiration!
@jackyef/bundlesizecloud-archive-s3@codewitchbella/microbundlehahnbee-testhahnbee-test-client@infinitebrahmanuniverse/nolb-brot@saaspe/components@everything-registry/sub-chunk-1265p149-tabletemporaetwilsonwaneweb-test-runner-performancevite-browservite-slimlasso-unpacklasso-bundle-sizeicon-pipelinegzip-br-sizegulp-sizelundlekrown_login_librarymatthewmueller-microbundle@wane/core@watching/cli@wpe-tkpd/bundlesize@ttungbmt/microbundle-crl@uchihamalolan/export-size@touchtech/microbundle@thatonejustin/alpine-breakpoint@tomyail/microbundle@thatonejustin/alpine-swiper@zeusdeux/clianalytics-rn-supportalpine-swiperalpine-breakpointaxios-yet-another-proxy-fixaz-esbuildatomic-css-statsant-design-draggable-modal-fixargogogo-runarui-scripts-akitovdokioesbuild-plugin-filesizeevanutilsfile-size-webpack-pluginfilesize-badgerfilesize-calculatorcomponitcompressed-size-plugincb-rollup-plugin-filesizebadge-sizeaugmbuildsize-clibrotli-size-clibunzeebundle-rangebundlemonbundlesizebundlesize-extconfigbundlesize-min-size-forkbundlesize-no-exitbundlesize-plugin-brotlibundlesize-warndolorematquedoloribussedsqip-demosuntmolestiaetrama-analyticsmicrobundle-esmicrobundle-matthewmuellermicrobundlemicrobundle-alosdmicrobundle-cra-oprmicrobundle-crlmicrobundle-crl-postcss8microbundle-crl-runtimemicrobundle-crl-with-assetsmicrobundle-enhancedp147-tablep148-tablerollup-plugin-fileinforollup-plugin-filesizerollup-plugin-filesize-gzbrrollup-plugin-bundle-summaryrollup-plugin-summaryreact-lightbox-pack-18supportreact-gantt-chart7node-geohashnka-gantt-task-reactnecessitatibusdelenitipostcss-statsresponsis-gantt-task-reactreact-picky-with-clearsize-plugin-coresize-canal@iosio/node-util@iosio/x-project@kne/microbundle@known-as-bmf/tscli
4.0.0

6 years ago

3.0.1

6 years ago

3.0.0

6 years ago

2.0.0

6 years ago

1.0.0

6 years ago

0.1.0

7 years ago

0.0.3

7 years ago

0.0.2

8 years ago

0.0.1

10 years ago