(chunks: Uint8Array[], totalLength: number)
| 426 | } |
| 427 | |
| 428 | private concatChunks(chunks: Uint8Array[], totalLength: number): Uint8Array<ArrayBuffer> { |
| 429 | const chunksAll = new Uint8Array(totalLength); |
| 430 | let position = 0; |
| 431 | for (const chunk of chunks) { |
| 432 | chunksAll.set(chunk, position); |
| 433 | position += chunk.length; |
| 434 | } |
| 435 | |
| 436 | return chunksAll; |
| 437 | } |
| 438 | } |
| 439 | |
| 440 | /** |