DIA Analyzer is a lightweight C library for identifying scientific instrument data files using header signature matching.
The library reads only the first portion of a file (default: 8 KB) and matches known instrument-specific signatures to determine the file format.
- Portable C99 implementation
- Thread-safe
- No heap allocations
- Low-level file I/O (
open/read/close) - Fast signature matching
- Easy to extend with additional instrument formats
- Simple C API
| Instrument | Extension |
|---|---|
| PerkinElmer Lambda 1050 | .asc |
| Agilent Cary 7000 UMA | .csv |
| Ocean Optics SpectraSuite | .txt |
| Avantes | .txt |
| Speedflo | .csv |
- Read the first 8192 bytes of the file.
- Extract the file extension.
- If extensions match, compare the header against corresponding signatures.
- Return the detected file type descriptor.
The analyzer identifies file formats solely from their header signatures and does not parse or validate any data.
int32_t analyze_file(const char *path);include/
analyzer.h Public API
src/
analyzer.c
io.c Low-level file I/O
util.c String and buffer utilities
signatures.c Known file signatures
detect.c Detection engine
tests/
data/
python-bindings/
dia-analyzer/
bindings.py Python bindings.