web: implement native compression

This commit is contained in:
Abdullah Atta
2022-11-11 16:57:55 +05:00
parent 1823a4f4ba
commit 8ae4ad6126
11 changed files with 182 additions and 6 deletions

View File

@@ -62,5 +62,18 @@ contextBridge.exposeInMainWorld("native", {
buttonLabel,
defaultPath
});
},
gzip: ({ data, level }) => {
return ipcRenderer.invoke("fromRenderer", {
type: "gzip",
data,
level
});
},
gunzip: ({ data }) => {
return ipcRenderer.invoke("fromRenderer", {
type: "gunzip",
data
});
}
});