/* tslint:disable */ /* eslint-disable */ /** * Wavelet transform used for decorrelation. */ export enum CompressionMethod { Cdf97 = 0, Cdf53 = 1, Sym4 = 2, Db4 = 3, } /** * Compression options. Construct with `new CompressionOptions(...)`. */ export class CompressionOptions { free(): void; [Symbol.dispose](): void; /** * Build compression options. * * * `method` — wavelet transform. * * `scale` — quantization shift (used when `quantMultiplier` is absent). * * `cutoff` — detail-threshold aggressiveness. * * `entropyCoder` — payload coder; omit / pass `undefined` for `auto`. * * `quantMultiplier` — explicit coefficient multiplier; overrides `scale` * so you can hit a precise PRD target instead of the power-of-two grid. */ constructor(method: CompressionMethod, scale: QuantizationScale, cutoff: CutoffLevel, entropyCoder?: EntropyCoder | null, quantMultiplier?: number | null); } /** * Aggressiveness of the detail-coefficient threshold (dead-zone). */ export enum CutoffLevel { Low = 0, Medium = 1, High = 2, } /** * Entropy coder for the payload. `Cmodel` (significance-map + per-subband * magnitude) is the most efficient; omit the argument for `auto`. */ export enum EntropyCoder { Deflate = 0, Arans = 1, Cmodel = 2, } /** * Quantization shift: DWT coefficients are scaled by `1 << scale` when no * explicit `quantMultiplier` is given. Also selects the threshold table. */ export enum QuantizationScale { S6 = 6, S7 = 7, S8 = 8, S9 = 9, S10 = 10, S11 = 11, S12 = 12, } /** * Compress a `Float32Array` of samples into a Bioleptic `Uint8Array`. */ export function compressSignal(data: Float32Array, options?: CompressionOptions | null): Uint8Array; /** * Decompress a Bioleptic `Uint8Array` back into a `Float32Array`. */ export function decompressSignal(data: Uint8Array): Float32Array; export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module; export interface InitOutput { readonly memory: WebAssembly.Memory; readonly __wbg_compressionoptions_free: (a: number, b: number) => void; readonly compressSignal: (a: number, b: number, c: number) => [number, number, number, number]; readonly compressionoptions_new: (a: number, b: number, c: number, d: number, e: number) => [number, number, number]; readonly decompressSignal: (a: number, b: number) => [number, number, number, number]; readonly __wbindgen_externrefs: WebAssembly.Table; readonly __wbindgen_malloc: (a: number, b: number) => number; readonly __externref_table_dealloc: (a: number) => void; readonly __wbindgen_free: (a: number, b: number, c: number) => void; readonly __wbindgen_start: () => void; } export type SyncInitInput = BufferSource | WebAssembly.Module; /** * Instantiates the given `module`, which can either be bytes or * a precompiled `WebAssembly.Module`. * * @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated. * * @returns {InitOutput} */ export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput; /** * If `module_or_path` is {RequestInfo} or {URL}, makes a request and * for everything else, calls `WebAssembly.instantiate` directly. * * @param {{ module_or_path: InitInput | Promise }} module_or_path - Passing `InitInput` directly is deprecated. * * @returns {Promise} */ export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise } | InitInput | Promise): Promise;