(chunks: Uint8Array[])
| 472 | } |
| 473 | |
| 474 | function concatBytes(chunks: Uint8Array[]): Uint8Array { |
| 475 | const total = chunks.reduce((sum, chunk) => sum + chunk.byteLength, 0); |
| 476 | const out = new Uint8Array(total); |
| 477 | let offset = 0; |
| 478 | for (const chunk of chunks) { |
| 479 | out.set(chunk, offset); |
| 480 | offset += chunk.byteLength; |
| 481 | } |
| 482 | return out; |
| 483 | } |
| 484 | |
| 485 | function createTarHeader(entry: TarInputEntry): Uint8Array { |
| 486 | const header = new Uint8Array(512); |
no test coverage detected