Random-access byte source — any file, any backing store.
The engine reads arbitrary offsets on demand (xref at end of file, objects scattered throughout). This is NOT a forward-only stream — the engine seeks backward and forward. A one-shot socket or pipe that can only read sequentially cannot be a DataSource. Buffer the full content first, or use a backing store with random access.
Memory is O(1) per read (64KB max per call). The full file is never buffered by the engine — only the backing store holds it.
Implement with your backing store: file (pread), memory (sublistView), HTTP (Range header), IndexedDB, web Blob.slice.
- Implementers
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
readAt(
int offset, int count) → FutureOr< Uint8List> -
Read
countbytes starting atoffset. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited