Correct me if I'm wrong but I think there is an issue with the way Buffer's endianness works (or at least the "description" the methods have).
Lets say I create a new buffer: var myBuff = new Buffer(4); And now I wish to write an integer to my buffer in little-endian which has the least significant byte first: myBuff.writeUInt32LE(566, 0); Now then, one would expect that this method just wrote the integer '566' to my buffer in little-endian, but something odd goes on: > myBuff <Buffer 36 02 00 00> Hang on, thats not little-endian, thats big-endian. If I were to send this over the network now, and the other end expects the buffer to contain a integer in little-endian, they would be rudely interrupted with a big-endian integer. You can even demonstrate this by entering that hex into the interpreter: > 0x36020000 906100736 Am I confusing what the BE and LE mean in the `write` functions or is something weird going on? -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
