ReadonlysizeTotal size in bytes.
Optional ReadonlynameShown in error messages about this source, e.g. a file path.
length bytes from offset, fewer only where the source ends. The
returned bytes may be a view of the source's own memory, so a caller
must not modify them.
OptionalcloseReleases whatever the source holds open, if anything.
Where a reader gets its bytes from. This is what lets a reader honour Section 1.2's goal 2 ("a reader MUST be able to answer a lookup by reading and decompressing only a small, bounded part of the file"): a source is only ever asked for the bytes a lookup needs.
Reads are asynchronous so that a source can be anything that hands out byte ranges: a file (
FileSourcein./node.ts), aBloborFilein a browser, or bytes already in memory. Nothing here depends on Node.js.