sif
sif copied to clipboard
Improve Image Compaction Logic
When OptDeleteCompact is passed to (*FileImage).DeleteObject, an error is thrown if the object being deleted is not last in the SIF image:
https://github.com/sylabs/sif/blob/28ad31be3052905281de6a43bed1e72e9457be0d/pkg/sif/create.go#L502
This makes compaction difficult to use, since the caller needs to be aware of this limitation, and work around it.
We should extend compaction to work regardless of the position of the object being deleted.