buf.readInt8(offset[, noAssert])
Reads a signed 8-bit integer from the Buffer at the specified offset.
Setting noAssert to true skips validation of the offset. This allows the offset to be beyond the end of the Buffer.
Integers read from the Buffer are interpreted as two's complement signed values.
const buf = Buffer.from([1,-2,3,4]); buf.readInt8(0); // returns 1 buf.readInt8(1); // returns -2
Please login to continue.