How to use the brotli/compress function in brotli

To help you get started, we’ve selected a few brotli examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github u-wave / web / tasks / webpack / compress.js View on Github external
algorithm(buffer, opts, cb) {
          const result = brotli(buffer);
          if (result) {
            cb(null, Buffer.from(result));
          } else {
            cb(null, buffer);
          }
        },
      }),

brotli

A port of the Brotli compression algorithm as used in WOFF2

MIT
Latest version published 2 years ago

Package Health Score

73 / 100
Full package analysis