mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-14 17:49:52 +00:00
Swap OptiPNG with OxiPNG
This makes building simpler and allows us to potentially use multithreading version in the future. For now points to a custom fork of OxiPNG that enables WebAssembly support, as PR is still pending review.
This commit is contained in:
committed by
Ingvar Stepanyan
parent
4621cbcae9
commit
629d64326d
6
src/codecs/oxipng/encoder.ts
Normal file
6
src/codecs/oxipng/encoder.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
import { optimise } from '../../../codecs/oxipng/pkg';
|
||||
import { EncodeOptions } from './encoder-meta';
|
||||
|
||||
export async function compress(data: ArrayBuffer, options: EncodeOptions): Promise<ArrayBuffer> {
|
||||
return optimise(new Uint8Array(data), options.level).buffer;
|
||||
}
|
||||
Reference in New Issue
Block a user