Skip to content

Setting gzip mtime to zero on image save #1023

Closed
@effigies

Description

@effigies

Right now ImageOpener() does not allow us to pass an mtime, which means that saving identical images as .nii.gz 1s apart will produce two images with two different checksums.

Is there any value in saving a non-zero mtime? I see a few options, in my order of preference, most preferred first:

  1. Always save as 0.
  2. Default to 0, allow user to override.
  3. Default to a timestamp (current), allow user to override (new).

Note that the way we use GzipFile, it also sets the filename, which means saving the a.nii.gz and b.nii.gz with the same timestamp would still not have identical checksums. I would also be inclined to open GzipFiles in such a way as to not set filenames.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions