(bytes: Byte[], index: number, endian: Endian)
| 370 | } |
| 371 | |
| 372 | function wordAt(bytes: Byte[], index: number, endian: Endian): number { |
| 373 | let word = 0; |
| 374 | if (endian === Endian.Big) { |
| 375 | for (let i = 0; i < 4; i++) { |
| 376 | word += byteAt(bytes, index + i) << (24 - 8 * i); |
| 377 | } |
| 378 | } else { |
| 379 | for (let i = 0; i < 4; i++) { |
| 380 | word += byteAt(bytes, index + i) << (8 * i); |
| 381 | } |
| 382 | } |
| 383 | return word; |
| 384 | } |
no test coverage detected
searching dependent graphs…