Read up to length bytes starting at offset into into at
intoOffset, returning the number of bytes actually copied (fewer than
length only at end of source).
Absolute source offset to read from.
Maximum number of bytes to read.
Destination buffer.
Offset within into to write at.
The number of bytes copied.
A random-access, forward-readable byte source for the streaming parser.
The streaming index builder (see streaming_index_builder.ts) reads the source sequentially into a small moving window, so a
ByteSourceonly has to satisfy positioned reads — it never needs the whole file resident. The in-memoryBufferByteSourcehere is for tests and the resident case; a file-descriptor source (node) or an HTTP-Range source (M4) implements the same shape without holding the file in the JS heap.M0 keeps reads synchronous to reuse the existing synchronous parse loop unchanged. The asynchronous variant (network pull-parser) is M4.