Buffer position while reading data

21 views
Skip to first unread message

Noel Hibbard

unread,
Apr 14, 2016, 7:08:48 PM4/14/16
to nodejs
Buffer.readUInt32LE(5);
Buffer.readUInt32LE();



In that example the buffer offset should now be set to 13. On the first read I am setting the offset to 5 and reading 4 bytes leaving the offset at 9.. then I read 4 more bytes which would leave it at 13. But I don't want to have to keep track of where the offset is while parsing a bunch of data. Surely there is a way to read the current offset and seek within the buffer.
Reply all
Reply to author
Forward
0 new messages