ByteLengthQueuingStrategy

E242828

ByteLengthQueuingStrategy is a built-in queuing strategy in the JavaScript Streams API that manages backpressure by estimating chunk sizes in bytes rather than by count.

All labels observed (2)

How this entity was disambiguated

Statements (47)

Predicate Object
instanceOf QueuingStrategy
Web Streams API feature
built-in object
availableInEnvironment Node.js
Web browsers
availableInLanguage JavaScript
backpressureCondition total queued byte length exceeds highWaterMark
category backpressure control mechanism
comparedTo CountQueuingStrategy
constructorParameter init.highWaterMark
constructorParameterRequired highWaterMark
constructorParameterType number
controls internal queue of a stream
when backpressure is applied
defaultSizeAlgorithm returns chunk.byteLength if present
definedInSpecification WHATWG Streams Standard
distinguishedBy measures chunk size in bytes instead of count
exampleUsage new ReadableStream({ start(controller) { ... } }, new ByteLengthQueuingStrategy({ highWaterMark: 16384 }))
exposedOn global (Node.js)
globalThis
window
hasConstructor ByteLengthQueuingStrategy self-linksurface differs
surface form: ByteLengthQueuingStrategy(init)
hasMethod size(chunk)
hasProperty highWaterMark
introducedFor fine-grained control of memory usage in streams
isBuiltIn true
language ECMAScript
methodPurpose size(chunk) returns the size of a chunk in bytes
partOf Streams API
WHATWG Streams Standard
surface form: WHATWG Streams standard
primaryUse managing backpressure in streams
queueMeasurementBasis byte length of chunks
queueMeasurementUnit bytes
relatedAPI CountQueuingStrategy
ReadableStreamDefaultController
TransformStreamDefaultController
relatedConcept backpressure
highWaterMark
queue size
supportsUseCase binary data streaming
file I/O streaming
network data streaming
typicalChunkType ArrayBuffer
Buffer
Uint8Array
usedWith ReadableStream
TransformStream

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 ByteLengthQueuingStrategy
CountQueuingStrategy contrastsWith ByteLengthQueuingStrategy
ByteLengthQueuingStrategy hasConstructor ByteLengthQueuingStrategy self-linksurface differs
this entity surface form: ByteLengthQueuingStrategy(init)