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-slim@doyakovlev/arui-scripts@csr632/vite@condenast/bundlesize@bundle-analyzer/corelasso-unpacklasso-bundle-sizesqip-demosuntmolestiaetrama-analytics@aristidenf/streak-counter@atomico/rollup-plugin-sizes@ai-assistant/rollup-plugin-summary@akinoxsolutions/microbundle@alexshmyrkov/react-ranger@backslashbuild/microbundle@build-tracker/api-client@11ty/eleventy-img@devorso/dcountdown@hasparus/microbundle@heatmanofurioso/microbundle@efox/vite@eik/microbundle@freshworks/bundlesize@leiyulf/gantt-task-react@iosio/node-util@iosio/x-project@madsci/bundle-analyzer-core@luvio/bundlesize@micro-web/microbundle@modus/gimbal@kay.eg/pkg@known-as-bmf/tscli@kne/microbundle@kommunicate/kommunicate-chatbot-plugin@jsheaven/easybuild@pvtnbr/pkg-size@quantfive/microbundle-crl@saasify/microbundle@probablyup/microbundle@phated/vite@phanmn/vite@plogg/three@palashmon/bundlesize@parkcedar/leaflet@splish-me/microbundlemicrobundle-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-canalicon-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
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

6 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

9 years ago