wasm_gz 0.7.0

esm modules for gzip compression and/or decompression, with sync and async (worker) versions
Documentation
1
2
3
4
5
6
7
8
9
10
11
importScripts('./gzip_zopfli_for_importScripts.js');
(async()=>{
  const {gunzip,gzip,zopfli}=await fns;
  onmessage=async msg=>{
    if(msg.data.level===undefined){
      if(msg.data.zopfli) postMessage(zopfli(msg.data.bytes));
      else postMessage(gunzip(msg.data));
    }else postMessage(gzip(msg.data.bytes,msg.data.level));
  }
  postMessage('ready');
})();