Original implementation: rebuilds the accumulated buffer on every chunk.
This spreads every byte read so far into a JS number array and copies it into
a new Uint8Array, so total work grows quadratically with the stream size.
Kept as a baseline for benchmarks and as an explicit strategy.
Original implementation: rebuilds the accumulated buffer on every chunk.
This spreads every byte read so far into a JS number array and copies it into a new
Uint8Array, so total work grows quadratically with the stream size. Kept as a baseline for benchmarks and as an explicit strategy.