Skip to content

[feature] : Consider using compression when saving to .topostats file #1256

@SylviaWhittle

Description

@SylviaWhittle

Is your feature request related to a problem?

Currently we don't use compression when saving to .topostats files, resulting in huge file system weight. My own laptop is 90% full, mostly from .spm and .topostats files.

Describe the solution you would like.

At a cost of I/O speed, we could enable compression of our HDF5 datasets when saving to .topostats files.

Here's some documentation on compression when saving to .HDF5 files using h5py.
https://docs.h5py.org/en/latest/high/dataset.html

I haven't looked into this further but I did do a little investigation a while back and saw that compressed .HDF5 files were impressively small.

Note that array_size here is the size of one side of the square, so array_size = 100 means a 100 x 100 image.

Also note that the load time differences for anything below a 2000 x 2000 pixel image are negligible in my test case.

Image Image

Describe the alternatives you have considered.

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions