An inert reference to a byte range on disk: %FileSlice{path, offset, length}.
A leaf box may carry a FileSlice as its data instead of an in-memory binary,
so bulk payloads (notably mdat) are never loaded into memory. The bytes are read
or streamed on demand; nothing here holds an open file handle.
Summary
Functions
Read the slice's bytes into a binary (opens, preads, closes).
Stream the slice's bytes to an already-open (raw) io_device in chunk_size
chunks. The source is opened once (callback form, so it closes even if a write
raises) and read sequentially.
Types
@type t() :: %ISOMedia.FileSlice{ length: non_neg_integer(), offset: non_neg_integer(), path: Path.t() }
Functions
Read the slice's bytes into a binary (opens, preads, closes).
Stream the slice's bytes to an already-open (raw) io_device in chunk_size
chunks. The source is opened once (callback form, so it closes even if a write
raises) and read sequentially.