JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 51
  • Score
    100M100P100Q82317F
  • License BSD-3-Clause OR Apache-2.0

Biosignals compression

Package Exports

  • bioleptic-js
  • bioleptic-js/bioleptic_js.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (bioleptic-js) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Bioleptic

Wavelet-based signal compression for physiological data (ECG, PPG, accelerometry).

Algorithm

  1. Non-finite substitution (NaN → 0, ±inf → 0/1)
  2. Mean-centering + range normalization
  3. Multi-level DWT (CDF 5/3 or CDF 9/7, 5 levels)
  4. Quantization to i16 with configurable scale
  5. Detail coefficient thresholding
  6. Entropy coding with deflate

Rust

let compressed = compress(&signal, CompressionOptions::default())?;
let recovered  = decompress(&compressed)?;

Python

pip install bioleptic
from bioleptic import compress_signal, decompress_signal, BiolpCompressionOptions

compressed = compress_signal(signal, BiolpCompressionOptions("cdf97", 11, "low"))
recovered  = decompress_signal(compressed)

JavaScript

npm install bioleptic
import init, {compress_signal, decompress_signal} from "bioleptic";

await init();

const signal = new Float32Array([...]);

const options = new BiolpCompressionOptions(
    BiolpCompressionMethod.Cdf97,
    BiolpQuantizationScale.S11,
    BiolpCutoffLevel.Medium,
);

const compressed = compress_signal(signal, options);  // Uint8Array
const recovered  = decompress_signal(compressed);     // Float32Array

This project is licensed under either of

  • BSD-3-Clause License (see LICENSE)
  • Apache License, Version 2.0 (see LICENSE)

at your option.