Work

4DZip: a verifiable lossless compression tool for 4D-STEM data from counting and integrating detectors

Year: 2026
Type: article
Abstract: Four-dimensional scanning transmission electron microscopy (4D-STEM) data sets are large, and laboratories often keep the vendor file next to a converted copy. Herein, we report 4DZip, which compresses Gatan DigitalMicrograph (.dm4) 4D-STEM files into one standard HDF5 file, readable with h5py and hdf5plugin, from which 4DZip restores the original file byte for byte. Every byte needed for restoration is hashed, each archive is verified in a separate process before it is accepted, and the tool is started from the acquisition software on the instrument computer. All test files were restored with an identical SHA-256 digest, and each of 32,294 injected faults was either detected before restoration or left the restored output unchanged. At a matched nominal dose of 75,400 electrons per pattern, the floating-point output of an integrating camera required 12.6 times (12.0 to 13.1 over the common dose range) the bits per pattern of the unsigned-integer output of a counting camera. For counting data, a lossy count-rounding copy reduced the storage cost from 1.10 to 0.641 bits per pixel and passed a prespecified equivalence test on virtual bright-field, annular dark-field, center-of-mass, and strain maps of one specimen region at one dose.
Language: English
Open Access status: gold
Estimated APC paid: $2,690
OpenAlex ID: W7242129152
FWCI:
Cites: 31
Cited by:
Related to: 10