


I built an experimental alternative to .nii.gz using Zstd, chunked encoding, and ROI-aware compression
Hey everyone,
I’ve been working on a project called KMRI — an experimental medical imaging compression framework built around Zstandard instead of traditional gzip-based .nii.gz storage.
The idea was to explore whether chunked encoding, ROI-aware compression, sparse block optimization, and optional quantization could improve compression ratios and decode performance for volumetric MRI/NIfTI data.
The project is written in Python + C++ (pybind11) and includes:
- chunked compression
- ROI-aware encoding
- quantization pipelines
- sparse zero-block optimization
- benchmarking tools with PSNR/SSIM analysis
I also benchmarked it against:
- gzip (.nii.gz)
- raw zstd
- NumPy + zstd pipelines
(see attached photos)
Would genuinely love feedback from people who work with compression, imaging, or systems programming.
GitHub: