mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-17 03:00:13 +00:00
OxiPNG + threads PoC
This commit is contained in:
committed by
Ingvar Stepanyan
parent
685558847f
commit
4c658b79ef
8
codecs/oxipng/worker.js
Normal file
8
codecs/oxipng/worker.js
Normal file
@@ -0,0 +1,8 @@
|
||||
import initOxiPNG, { start_worker_thread } from './pkg/squoosh_oxipng.js';
|
||||
|
||||
addEventListener('message', async ({ data: [module, memory, threadPtr] }) => {
|
||||
// console.log([module, memory, threadPtr]);
|
||||
await initOxiPNG(module, memory);
|
||||
// console.log('Starting', threadPtr);
|
||||
start_worker_thread(threadPtr);
|
||||
}, { once: true });
|
||||
Reference in New Issue
Block a user