mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-11 16:26:20 +00:00
* Improve .gitattributes * Add disabled checkbox style * Update Makefile * Update jxl_enc.cpp * add -O3 flag to skia compilation for optimization's sake * Bump libjxl revision to 9f544641ec83f6abd9da598bdd08178ee8a003e0 Change use of EncodeFile from `EncodeFile(cparams, &io, &passes_enc_state, &bytes, /*aux=*/nullptr, pool_ptr)` to `EncodeFile(cparams, &io, &passes_enc_state, &bytes, /*cms=*/nullptr, /*aux=*/jxl::GetJxlCms(), pool_ptr)` * JPEG XL: Add lossy Modular option Co-authored-by: CanadianBaconBoi <beamconnor@gmail.com> Co-authored-by: CanadianBaconBoi <bc.bacon.bits@gmail.com>
Codecs
This folder contains a self-contained sub-project for each encoder and decoder that squoosh supplies.
Build
Each subproject can be built using Docker the following commands:
$ npm install
$ npm run build
This will build two files: <codec name>_<enc or dec>.js and <codec name>_<enc or dec>.wasm. It will most likely be necessary to set Module["locateFile"] to successfully load the .wasm file. When the .js file is loaded, a global <codec name>_<enc or dec> is created with the same API as an Emscripten Module.
Each codec will document its API in its README.