Skip to content
/ jSquash Public
forked from jamsinclair/jSquash

Browser & V8 Runtime focussed wasm bundles derived from the Squoosh App.

License

Notifications You must be signed in to change notification settings

iamcco/jSquash

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jSquash 🥝

Collection of WebAssembly image codecs that support the browser and are derived from the Squoosh App

Squoosh already provides a Node.js library.

The aim of this library is to provide an easy experience to encode, decode and modify images with the tools you know and love from Squoosh in the Browser and V8 runtimes 🖥️.

jSquash name is inspired by jQuery and Squoosh. It symbolizes the browser support focus of these packages.

Differences with Squoosh

  • The codecs and tools are built for both Web and Web Worker environments
  • No dynamic code execution, can be run in strict environments that do not allow code evaluation. Like Cloudflare Workers.
  • Does not rely on TextEncoder/TextDecoder API (could reduce performance) but allows it to be run in simpler V8 runtimes that only support UTF-8 (Cloudflare Workers, Vercel Edge Functions etc.)

Packages

Examples

Known Issues

Vite Project throws TypeError: Failed to construct 'URL': Invalid URL

This affects WASM modules using JS glue code provided by rust wasm-pack.

As a workaround, update your vite.config.js file with the optimizeDeps property. Put affected module names in the exclude array.

import { defineConfig } from 'vite'

export default defineConfig({
  optimizeDeps: {
    exclude: ["@jsquash/png"]
  }
})

About

Browser & V8 Runtime focussed wasm bundles derived from the Squoosh App.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 36.0%
  • JavaScript 30.2%
  • C++ 24.0%
  • Makefile 8.8%
  • Other 1.0%