mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-18 11:39:08 +00:00
@@ -12,6 +12,5 @@ export async function decode(data: ArrayBuffer): Promise<ImageData> {
|
||||
if (!result) {
|
||||
throw new Error('Decoding error');
|
||||
}
|
||||
module.doLeakCheck();
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -14,7 +14,6 @@ export async function encode(data: ImageData, options: EncodeOptions): Promise<A
|
||||
if (!result) {
|
||||
throw new Error('Encoding error');
|
||||
}
|
||||
module.doLeakCheck();
|
||||
|
||||
// wasm can’t run on SharedArrayBuffers, so we hard-cast to ArrayBuffer.
|
||||
return result.buffer as ArrayBuffer;
|
||||
|
||||
Reference in New Issue
Block a user