u/Deep_Report_6528

Image 1 — I built an experimental alternative to .nii.gz using Zstd, chunked encoding, and ROI-aware compression
Image 2 — I built an experimental alternative to .nii.gz using Zstd, chunked encoding, and ROI-aware compression
Image 3 — I built an experimental alternative to .nii.gz using Zstd, chunked encoding, and ROI-aware compression
▲ 9 r/compsci+1 crossposts

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:

https://github.com/Kiamehr5/KMRI

u/Deep_Report_6528 — 3 days ago

KMRI is chunk-based MRI compression format for .nii files (Python + Zstd and C++).
Got strong compression on synthetic MRI-like volumes, especially smooth data (up to ~900× in best case scenarios due to zero-block skipping).

Check it out at https://github.com/Kiamehr5/KMRI and let me know what you think 💻

u/Deep_Report_6528 — 21 days ago