const buf = Buffer.from([0, 5]);
// Prints: 5
console.log(buf.readInt16BE());
// Prints: 1280
console.log(buf.readInt16LE());
5 : 0000 0000 0000 0101
1280 : 0000 0101 0000 0000
const buf = Buffer.from([0, 5]);
// Prints: 5
console.log(buf.readInt16BE());
// Prints: 1280
console.log(buf.readInt16LE());
5 : 0000 0000 0000 0101
1280 : 0000 0101 0000 0000