Skip to content

Version 1.3.0

Choose a tag to compare

@tri-adam tri-adam released this 11 Jun 20:00
da34172

This minor release includes significant changes to the underlying I/O implementation to access SIF files. In addition, func (*Descriptor).GetReadSeeker and several fields within struct FileImage have been deprecated.

Removal of Memory Mapped I/O

Previously, the SIF implementation used mmap to memory map the underlying SIF image in certain scenarios. This approach can cause occasional failures when accessing a SIF image that is backed by a non-local filesystem. See #11 for more detail.

Deprecation

func (*Descriptor).GetReadSeeker has been deprecated and will be removed in a future major release. Users should migrate to func (*Descriptor).GetReader. See #14 for more detail.

Several fields in struct FileImage have been deprecated in this release. These fields now have the following behaviour:

  • FileImage.Filedata will always be nil. Previously, this contained a non-nil []byte in certain scenarios. Functions such as *FileImage.GetHeader, *Descriptor.GetData, and *Descriptor.GetReadSeeker should now be used to access data within a FileImage.
  • FileImage.Amodebuf will always be true, since the underlying file is never memory mapped. Previously, this was false if the underlying file was memory mapped.
  • FileImage.Reader will always be nil. Previously, this contained a non-nil *bytes.Reader in certain scenarios. Functions such as *FileImage.GetHeader, *Descriptor.GetData, and *Descriptor.GetReadSeeker should now be used to access data within a FileImage.