Node.js Buffer.writeUInt32LE() Method
The Buffer.writeUInt32LE() method is used to write specified bytes using Little endian format to the buffer object. The value contains a valid unassigned 32-bit integer.
Buffer.writeUInt32LE( value, offset )
Parameters: This method accept two parameters as mentioned above and described below:
- value: It is an integer value and that is to be written into the buffer.
- offset: It is an integer value and it represents the number of bytes to skip before starting to write and the value of offset lies within the range 0 to buffer.length – 4. Its default value is 0.
Return value: It returns an integer value offset plus number of bytes written.
<Buffer cd ab cd ab> <Buffer ba dc ce fa>
<Buffer ce ab 00 00> <Buffer ab 0e 00 00>
Note: The above program will compile and run by using the
node index.js command.