wasmlets
v0.0.6
Published
WASM compiled code for wavelet decompositions. Currently based on https://github.com/rafat/wavelib
Readme
wasmlets - wavelet transforms for the web
The goal of wasmlets is to provide fast wavelet decomposition and reconstruction functions for use from a JavaScript (or Typescript) environment, by compiling existing libraries to WebAssembly (wasm).
Currently, we are using the wavelib C library as the underlying implementation.
How fast is it? See flatironinstitute/web-wavelets-benchmarking for comparisons (more always welcome!)
Installation
npm i wasmletsUse
Before calling anything else, you must await the init() function
to load the WebAssembly module.
Then there are two functions, inspired by the API from PyWavelets:
function wavedec(
data: Float64Array,
wavelet: Wavelet,
mode?: Mode,
level?: number | undefined,
): Float64Array[];
function waverec(
coeffs: Float64Array[],
wavelet: Wavelet,
mode?: Mode,
): Float64Array;Building
You will need both Emscripten and yarn installed.
You can then run make followed by yarn build.
