buffer.readIntBE()

buf.readIntBE(offset, byteLength[, noAssert])

buffer.readInt8()

buf.readInt8(offset[, noAssert]) offset <Number> 0 <= offset <= buf.length - 1 noAssert <Boolean> Default: false Return: <Number> 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

buffer.readInt32LE()

buf.readInt32LE(offset[, noAssert]) offset <Number> 0 <= offset <= buf.length - 4 noAssert <Boolean> Default: false Return: <Number> Reads a signed 32-bit integer from the Buffer at the specified offset with the specified endian format (readInt32BE() returns big endian, readInt32LE() returns little endian). 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 interpre

buffer.readFloatLE()

buf.readFloatLE(offset[, noAssert]) offset <Number> 0 <= offset <= buf.length - 4 noAssert <Boolean> Default: false Return: <Number> Reads a 32-bit float from the Buffer at the specified offset with specified endian format (readFloatBE() returns big endian, readFloatLE() returns little endian). 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.readFloatBE();

buffer.readInt16LE()

buf.readInt16LE(offset[, noAssert]) offset <Number> 0 <= offset <= buf.length - 2 noAssert <Boolean> Default: false Return: <Number> Reads a signed 16-bit integer from the Buffer at the specified offset with the specified endian format (readInt16BE() returns big endian, readInt16LE() returns little endian). 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 interpre

buffer.readInt32BE()

buf.readInt32BE(offset[, noAssert])

buffer.readInt16BE()

buf.readInt16BE(offset[, noAssert])

buffer.readFloatBE()

buf.readFloatBE(offset[, noAssert])

buffer.length

buf.length <Number> Returns the amount of memory allocated for the Buffer in number of bytes. Note that this does not necessarily reflect the amount of usable data within the Buffer. For instance, in the example below, a Buffer with 1234 bytes is allocated, but only 11 ASCII bytes are written. const buf = Buffer.allocUnsafe(1234); console.log(buf.length); // Prints: 1234 buf.write('some string', 0, 'ascii'); console.log(buf.length); // Prints: 1234 While the length property is no

buffer.readDoubleLE()

buf.readDoubleLE(offset[, noAssert]) offset <Number> 0 <= offset <= buf.length - 8 noAssert <Boolean> Default: false Return: <Number> Reads a 64-bit double from the Buffer at the specified offset with specified endian format (readDoubleBE() returns big endian, readDoubleLE() returns little endian). 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,5,6,7,8]); buf.re