How to decode "binary" encoded string into raw binary Buffer?
const buffer = new Buffer(binaryString, "binary");
Tested with:
$ node
> var binaryString = "\xff\xfa\xc3\x4e";
> var buffer = new Buffer(binaryString, "binary");
> console.log(buffer);
<Buffer ff fa c3 4e>
Update: since v10.0.0 - Use Buffer.from(string[, encoding])
instead.