I have a binary string and I need to be able to convert it to an ArrayBuffer/TypedArray containing the 0-255 values of each octet. For example:
const string = "01110100011001010111100001110100";
// should log an ArrayBuffer containing 116, 101, 120, and 116
console.log(stringToArrayBuffer(string));
My question is basically the reverse of this question.