I'm trying to persist a string to disk, but every mechanism I've tried loses bits. The string is holding binary data generated by a third-party lib.
Searching online has turned up lots of recommendations to use the Buffer class, however I'm also unable to round-trip the data through Buffer without losing bits. That is, in general str !== (new Buffer(str, 'binary')).toString('binary')) How can I persist a string without losing bits? Are there docs anywhere on how the String class encodings work, and how to move data in and out of String without losing bits? -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old group rules: 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 unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. To post to this group, send email to nodejs@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/a7bcd997-7198-4569-8ebc-ef062ea9a478%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.