1 | ;
|
2 |
|
3 | // Abstract reading multi-byte unsigned integers
|
4 | function readUInt (buffer, bits, offset, isBigEndian) {
|
5 | offset = offset || 0;
|
6 | var endian = isBigEndian ? 'BE' : 'LE';
|
7 | var method = buffer['readUInt' + bits + endian];
|
8 | return method.call(buffer, offset);
|
9 | }
|
10 |
|
11 | module.exports = readUInt;
|