BlobByteSource class final

A ByteSource over a browser web.Blob (or File, which extends Blob).

Reads use Blob.slice(...).arrayBuffer(), which browsers execute independently per call, true pread semantics, so a reader can fetch several entries' bytes concurrently. Works under both dart2js and dart2wasm.

Implemented types

Constructors

BlobByteSource(Blob blob, {String? name})
Creates a source over blob. A browser File (from an <input type=file> or drag-and-drop) is a Blob and works directly; pass its name as name if entry-name derivation matters.

Properties

hashCode → int
The hash code for this object.
no setterinherited
length → int
Total length of the source in bytes.
final
name → String?
Optional display name for the source (a file path, a browser File name), used by formats that derive entry names from the container (e.g. a bare .gz with no FNAME field). Null when the source has no meaningful name.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

close() → Future<void>
Releases any resources held by the source. Idempotent.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
read(int offset, int length) → Future<Uint8List>
Reads exactly length bytes starting at byte offset.
override
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited