1 | ;
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.readUInt = void 0;
|
4 | // Abstract reading multi-byte unsigned integers
|
5 | function readUInt(buffer, bits, offset, isBigEndian) {
|
6 | offset = offset || 0;
|
7 | const endian = isBigEndian ? 'BE' : 'LE';
|
8 | const methodName = ('readUInt' + bits + endian);
|
9 | return buffer[methodName].call(buffer, offset);
|
10 | }
|
11 | exports.readUInt = readUInt;
|