The smallest brotli compression module for the edge.
Note: Only synchronous processing in a single thread and in a single iteration is supported
import * as brotli from 'brotli-compress-wasm';
// size of compressed buffer
const size = brotli.compress(buffer);
// ...to take output as Uint8Array
const result = brotli.output(size);
Recommend to use yarn for dependency management:
yarn add brotli-compress-wasm
brotli-compress-wasm is MIT licensed.