On Tuesday, April 22, 2014 8:29:15 PM UTC-4, Mike Kobyakov wrote:
>
> nodejs does a str.toString('binary') on the compressed buffer. this
> changes the buffer as in the following example.
>
Don't use the 'binary' encoding unless you absolutely have to. Just keep
the data as a Buffer (which is what you get by default when receiving data
from a socket for example). If the "object" you're describing is JSON, then
you should be able to convert the Buffer via:
JSON.parse(data.toString('utf8'));
--
--
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/d/optout.