Hi Judd,
Judd wrote:
> > The traditional approach of storing all volume masks in a
> standard AFNI .HEAD/.BRIK file format would take much space
> (1e5 full-brain subbrik volumes, which would mean about
> 10-100GB of data using bytes) and is inefficient as almost all
> values would be zero (not in the mask).
>
> Using compression works extremely well with masks. (I think
> gzip includes run-length compression) For example a compressed
> mask can save 98.9% of disk space compared to an uncompressed
> mask
thanks for the suggestion, however my big file (10-100GB) example was meant to illustrate why in my situation a sparse representation would be useful; I did not plan to really make such big files.
I'm looking for a way to store these sparse masks efficiently (which could be done with gzip, in principle) and so that they can easily be read and written without the need to unzip the data to its original size (which seems inevitable when using gzip; see my other post with an alternative proposal).
cheers,
Nick