jamsinclair / jSquash

Browser & Web Worker focussed image codec wasm bundles derived from the Squoosh App.
Apache License 2.0
241 stars 16 forks source link

Add worker helper or example? #3

Closed jamsinclair closed 4 months ago

marklundin commented 1 year ago

@jamsinclair Is there anything specific that needs to be done to run this in a worker?

jamsinclair commented 12 months ago

@marklundin, nope so long as you can import them and bundle the worker yourself it should be fine!

The only known issue is #37.

jamsinclair commented 4 months ago

I've added an example at https://github.com/jamsinclair/jSquash/blob/main/examples/web-workers to show case how you can run the code from a Web Worker.

At this time I don't want to abstract the WebWorker part and leave that to the user. For several reasons: