(block: Uint8Array)
| 565 | } |
| 566 | |
| 567 | const sumBlock = (block: Uint8Array): number => { |
| 568 | // Four sums let the loop run faster than one |
| 569 | let a = 0 |
| 570 | let b = 0 |
| 571 | let c = 0 |
| 572 | let d = 0 |
| 573 | for (let i = 0; i < BLOCK; i += 4) { |
| 574 | a += block[i] |
| 575 | b += block[i + 1] |
| 576 | c += block[i + 2] |
| 577 | d += block[i + 3] |
| 578 | } |
| 579 | return a + b + c + d |
| 580 | } |
| 581 | |
| 582 | const USTAR_MAGIC = [0x75, 0x73, 0x74, 0x61, 0x72, 0x00] // "ustar\0" |
| 583 | const GNU_MAGIC = [0x75, 0x73, 0x74, 0x61, 0x72, 0x20, 0x20, 0x00] // "ustar \0" |
no outgoing calls
no test coverage detected