I'm converting my code from Node.js to browsers' javascript, but I have a problem with the Buffers in node.js. How can I use them in Javascript?
Here's an example:
new Buffer("foo", encoding='utf8')
<Buffer 66 6f 6f>
I need to transform [66, 6f, 6f] in javascript to "foo" and vice-versa. How can I do that?
NOTE: this must be done without Node.js.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…