buffer.readUInt8()

buf.readUInt8(offset[, noAssert])

Reads an unsigned 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.

const buf = Buffer.from([1,-2,3,4]);

buf.readUInt8(0);
  // returns 1
buf.readUInt8(1);
  // returns 254
doc_Nodejs
2016-04-30 04:37:42
Comments
Leave a Comment

Please login to continue.