forked from external-repos/squoosh
Whole new world
Updated to use new libdeflate integration that I implemented upstream in https://github.com/shssoichiro/oxipng/pull/203.
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
mod malloc_shim;
|
||||
|
||||
use wasm_bindgen::prelude::*;
|
||||
|
||||
#[wasm_bindgen(catch)]
|
||||
pub fn optimise(data: &[u8], level: u8) -> Vec<u8> {
|
||||
let options = oxipng::Options::from_preset(level);
|
||||
let mut options = oxipng::Options::from_preset(level);
|
||||
options.deflate = oxipng::Deflaters::Libdeflater;
|
||||
oxipng::optimize_from_memory(data, &options).unwrap_throw()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user