parsescp in the browser

TL;DR

I've compiled parsescp to WASM and used it to create a simple demo of an in-browser SCP-ECG parser.

Introduction

SCP-ECG (short for Standard communications protocol for computer assisted electrocardiography) is a standard for capturing/storing electrocardiogram data. It was first published in 1993 and remains in use today.

By standardizing the ECG data, it became possible to exchange it between different systems and vendors.

SCP-ECG is a binary format, so you always need libraries/tools to parse it to be able to see and use the encoded data. Among the existing tools for working with SCP-ECG, the most notable one is parsescp.

About parsescp

parsescp is a C-based utility for parsing SCP-ECG files. Specifically, it implements the AAMI SCP-1999 standard.

Compiling parsescp to WASM using Emscripten

It used to be that C/C++ libraries and tools like parsescp could only run on desktops or servers. This changed with the development of Emcripten, a toolchain for compiling C/C++ code to asm.js and later WebAssembly (WASM) which can run in the browser.

With the new compilation targets, Emscripten changed the game and "untethered" the C/C++ logic from the desktop.

Many C/C++ applications and libraries have been brought to the web using Emscripten, enabling a new class of web apps that leverage existing C/C++ codebases. To my knowledge, no-one's done it for parsescp so I went on to compile it to WASM and created a simple demo of parsescp-in-the-browser (see below).

Demo: In-browser SCP-ECG parser

Press Open SCP-ECG file to load and parse the file.

See also

Made by Anton Vasetenkov.

If you want to say hi, you can reach me on LinkedIn or via email. If you like my work, you can support me by buying me a coffee.