Justin
Buffer.prototype.toByteArray = function () { return
Array.prototype.slice.call(this, 0) }
--i
> --
> You received this message because you are subscribed to the Google Groups
> "nodejs" group.
> To post to this group, send email to nod...@googlegroups.com.
> To unsubscribe from this group, send email to
> nodejs+un...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en.
>
>
Should be all on one line, or like this:
Buffer.prototype.toByteArray = function () {
return Array.prototype.slice.call(this, 0)
}
As to the reason, I end up with an array of buffers as some of the
data arrives in multiple events from the original stream, and
sometimes it is easier to join them all up into a single byte array. I
could avoid doing it, and do some of the time...
Justin