(block: Uint8Array, offset: number, length: number, field: string)
| 803 | } |
| 804 | |
| 805 | const readUnsigned = (block: Uint8Array, offset: number, length: number, field: string): number => { |
| 806 | const value = readNumber(block, offset, length) |
| 807 | if (value < 0) { |
| 808 | throw invalidHeader(`negative ${field}`) |
| 809 | } |
| 810 | return value |
| 811 | } |
| 812 | |
| 813 | // The checksum is the sum of the block bytes with the checksum field counted as |
| 814 | // spaces. Some old tar writers summed signed bytes, which is accepted too. |
no test coverage detected