On Feb 28, 7:32 pm, billywhizz <[email protected]> wrote:
> ok. understood. anyone know the fastest way to concatenate multiple
> buffers into a single buffer? i need to concatenate multiple binary
> buffers into one binary buffer when doing a file upload. the only way
> i can think of is to do the following:

If I know the total length beforehand, I always create a Buffer
beforehand the size of the total length and just copy each incoming
chunk to this Buffer, increasing a byte pointer along the way.

Otherwise, using the array method is probably the next best fit for
most cases.

-- 
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

Reply via email to