arXiv:2611.01358cs.SEOct 2026

Manuscript Offprint

arXiv:2611.01358

WFDB-x: Conformance-Tested Implementations of the WFDB Software Package in Seven Programming Languages

Reza Sameni

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original. This text is shared under the same licence.

R. Sameni

WFDB-x: Conformance-Tested Implementations of the WFDB Software Package in Seven Programming Languages

Reza Sameni¹,²ID

¹Department of Biomedical Informatics, Emory University, Atlanta, GA, USA

²Department of Biomedical Engineering, Georgia Institute of Technology and Emory University, Atlanta, GA, USA

E-mail: rsameni@emory.edu

Keywords: WFDB, PhysioNet, Python, C++, Rust, MATLAB, Octave, Julia, R, Kotlin, open-source software, unit testing

Abstract

Objective: The WFDB format is widely used to store and exchange physiological waveforms and annotations, including many PhysioNet datasets. However, existing software implementations are limited to C, Python, and MATLAB/Octave (no longer maintained), can produce different results in corner cases and checksum calculations, and have defaults such as sampling frequency and gain, that can lead to silent misinterpretation of recordings. We developed WFDB-x, a cross-language, performance-optimized reimplementation of WFDB in seven popular programming languages, with extensive unit tests, to provide consistent WFDB processing across programming languages.

Approach: We reimplemented the WFDB Software Package 10.7.0 natively in Python, C++, Rust, Julia, R, MATLAB/Octave, and Kotlin, using AI-assisted development under human direction and review. Each implementation provides library functions, a high-level interface, and command-line tools. We compared their outputs with those of the original C programs using 1098 conformance cases, 877 legacy-mode cases, unit tests, and differential fuzzing. Deliberate changes remove implicit waveform parameters, restrict file and network access, and prevent annotation loss. A legacy mode retains the original behavior.

Main results: All seven implementations passed every conformance and legacy-mode case on the tested Linux platform, with matching outputs. The unit tests contain 9353 assertions. C++, Rust, and Julia read records 1.5–6.9 times faster than the original C library, while the Python implementation wrote records 9.2 times faster than the existing wfdb-python library in the benchmark.

Significance: WFDB-x provides a tested, open-source basis for reading and writing physiological recordings consistently across seven languages, supporting reproducible research and software development without requiring a shared programming environment. We also share details of the AI-assisted development process and token utilization, which may be useful for other applications.

References (54)