ReadableStreamBYOBReader

E242823

ReadableStreamBYOBReader is a web streams API interface that lets consumers efficiently read binary data into their own pre-allocated buffers for finer control over performance and memory usage.

All labels observed (1)

Label Occurrences
ReadableStreamBYOBReader canonical 3

How this entity was disambiguated

Statements (48)

Predicate Object
instanceOf Readable stream reader type
Web API interface
availableIn Service Workers
Web workers
surface form: Web Workers

Web browsers
cannotBeUsedWith default ReadableStream of non-byte chunks
category Client-side web platform feature
createdBy ReadableStream.prototype.getReader({ mode: 'byob' })
definedIn WHATWG Streams Standard
surface form: WHATWG Streams specification
designedFor fine-grained control over memory usage
high-performance streaming
reading binary data
zero-copy or low-copy data access
errorCondition TypeError if read() called after releaseLock()
TypeError if used with non-byte stream
hasBehavior locks the associated ReadableStream while active
releasing the lock allows other readers or piping
hasConstraint stream must be a byte stream
hasMethod cancel(reason)
read(view)
releaseLock()
hasProperty closed
introducedTo support BYOB (bring your own buffer) reads
languageBinding JavaScript
mutuallyExclusiveWith ReadableStreamDefaultReader on the same stream
optimizedFor reducing buffer allocations
reducing garbage collection pressure
partOf Streams API
WHATWG Streams Standard
promiseProperty closed rejects if the stream errors
closed resolves when the stream closes
readFills provided buffer view with bytes
readReturns Promise of { value, done }
readsInto DataView
TypedArray
pre-allocated ArrayBufferView
requires underlying byte source
supportedIn modern Chromium-based browsers
Mozilla Firefox
surface form: modern Firefox (behind or with flags, depending on version)

Apple Safari
surface form: modern Safari (subject to version-specific support)
supportsOperation cancel
read
releaseLock
typicalUseCase file and blob reading
media streaming
network streaming of binary protocols
usedWith ReadableByteStreamController
ReadableStream

How these facts were elicited

Referenced by (3)

Full triples — surface form annotated when it differs from this entity's canonical label.

Streams Standard definesConcept ReadableStreamBYOBReader
ReadableStreamDefaultReader alternativeReader ReadableStreamBYOBReader
ReadableStreamBYOBRequest relatedConcept ReadableStreamBYOBReader