4.0.0 • Published 5 years ago

brotli-size v4.0.0

Weekly downloads
296,048
License
MIT
Repository
github
Last release
5 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-tableesbuild-plugin-filesizefilesize-badgerfilesize-calculatorfile-size-webpack-pluginevanutils@wpe-tkpd/bundlesizegulp-sizegzip-br-sizeicon-pipeline@madsci/bundle-analyzer-core@luvio/bundlesizenecessitatibusdelenitimatthewmueller-microbundlelundlemicrobundlemicrobundle-alosdmicrobundle-cra-oprmicrobundle-crlmicrobundle-crl-postcss8microbundle-crl-runtimemicrobundle-crl-with-assetsmicrobundle-enhancedmicrobundle-esmicrobundle-matthewmuellerlasso-unpacklasso-bundle-sizepostcss-statsp147-tablep148-table@phanmn/vite@phated/vite@parkcedar/leaflet@plogg/threenka-gantt-task-react@probablyup/microbundle@pvtnbr/pkg-size@quantfive/microbundle-crl@saasify/microbundle@palashmon/bundlesize@ai-assistant/rollup-plugin-summary@backslashbuild/microbundleaugm@wane/core@watching/cliargogogo-runarui-scriptsarui-scripts-akitovaxios-yet-another-proxy-fixatomic-css-statsreact-lightbox-pack-18supportrollup-plugin-summaryrollup-plugin-bundle-summaryanalytics-rn-support@aristidenf/streak-counterant-design-draggable-modal-fixreact-picky-with-clear@11ty/eleventy-img@uchihamalolan/export-size@splish-me/microbundle@touchtech/microbundle@tomyail/microbundle@shopilemon/cli@shopify/argo-run@shopify/checkout-ui-extensions-run@shoplinedev/checkout-ui-extensions-run@alexshmyrkov/react-ranger@zeusdeux/cli@akinoxsolutions/microbundleresponsis-gantt-task-reactrollup-plugin-fileinforollup-plugin-filesizerollup-plugin-filesize-gzbr@atomico/rollup-plugin-sizesalpine-breakpointaz-esbuildbundlemonbundlesizebundlesize-extconfigbundlesize-min-size-forkbundlesize-no-exitbundlesize-plugin-brotlibundlesize-warnbuildsize-clisuntmolestiaetemporaetcb-rollup-plugin-filesizecompressed-size-plugincomponit@ttungbmt/microbundle-crlsqip-demo@build-tracker/api-client
4.0.0

5 years ago

3.0.1

5 years ago

3.0.0

5 years ago

2.0.0

5 years ago

1.0.0

5 years ago

0.1.0

5 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

8 years ago