mscompress¶
Multi-threaded lossless and lossy compression for Mass Spectrometry data.
mscompress defines the .msz file format — a random-access compressed
container for mzML data — and ships the C library, CLI, Python bindings, and
Node.js/TypeScript bindings that read and write it. An extended container
format, .mszx, bundles a compressed spectra file with search-result
annotations and a JSON manifest.
What it does¶
- Reads mzML (uncompressed XML) and produces MSZ (compressed, random access without full decompression).
- Stores XML metadata, m/z arrays, and intensity arrays as three independently compressed streams so any spectrum can be retrieved in O(1) seeks.
- Supports a registry of pre-compression transforms (delta encoding, log, bit-packing, type casts, variable bit-rate) that improve compression ratio on numeric arrays.
- Bundles MSZX archives that ship search results (pepXML / Percolator TSV) alongside the spectra.
Pick your interface¶
-
Python
Cython-backed bindings with optional Parquet, PyTorch, and JAX adapters.
-
Node.js / TypeScript
N-API addon with prebuilt binaries for macOS, Linux, and Windows.
-
CLI
Standalone
mscompressbinary for batch compression and extraction. -
C library
Core library and architecture — how the format and algorithms work.
Quick links¶
- MSZ format spec — byte-level layout
- Algorithm catalog — registered transforms
- Implementing a new algorithm
- Contributing