Web APIs
ByteLengthQueuingStrategy()
Use chunk byteLength to estimate queue size for streams with byte-sized chunks. The high-water mark guides backpressure rather than enforcing an allocation limit. Example console output: 16 5.
Formal Syntax & Structure
javascript syntaxjavascript
new ByteLengthQueuingStrategy({highWaterMark})Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| options | object | Required highWaterMark number. |
Return Value
ByteLengthQueuingStrategy
Byte-length strategy.
Working Example
Example Snippetjavascript
const strategy=new ByteLengthQueuingStrategy({highWaterMark:16}); console.log(strategy.highWaterMark,strategy.size(new Uint8Array(5)));