* Bumps

* Update fflate imports
This commit is contained in:
Jaco Greeff
2021-01-21 12:59:06 +01:00
committed by GitHub
parent 1e5b33413f
commit 8510120701
3 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -21,7 +21,7 @@ function hdr (package) {
function getWasmBuffer (lib = 'fflate') {
const data = fs.readFileSync('./bytes/wasm_opt.wasm');
const compressed = lib === 'fflate'
? Buffer.from(require('fflate').zlibSync(data, { level: 9 }))
? Buffer.from(require('fflate/node').zlibSync(data, { level: 9 }))
: Buffer.from(require('lz4js').compress(data));
console.log(`*** Compressed WASM via ${lib}: ${formatNumber(data.length)} -> ${formatNumber(compressed.length)} (${(100 * compressed.length / data.length).toFixed(2)}%)`);