Creates a resizable-buffer strategy with a custom maximum byte length.
The strategy grows a resizable ArrayBuffer in place while reading. On
runtimes that resize without copying, peak memory stays close to the final
stream size instead of the input + output doubling of
stream2uint8arrayChunkAndJoin. The returned Uint8Array is a
length-tracking view whose buffer may still be flagged as resizable.
Throws a RangeError when the stream exceeds maxBuf.
Parameters
maxBuf: number = STREAM2UINT8ARRAY_RESIZABLE_MAX_BYTES
Creates a resizable-buffer strategy with a custom maximum byte length.
The strategy grows a resizable
ArrayBufferin place while reading. On runtimes that resize without copying, peak memory stays close to the final stream size instead of the input + output doubling of stream2uint8arrayChunkAndJoin. The returnedUint8Arrayis a length-tracking view whose buffer may still be flagged as resizable.Throws a
RangeErrorwhen the stream exceedsmaxBuf.