I’m trying to load a binary file as a string, and parse it using bitstring. when i try reading the file as a string in javascript, I see a few extra bytes inserted, which makes me think that when I call ReadAsBinaryString, javascript is using a string encoding that spills some characters into two bytes.
Furthermore, when I was googling to see if any one else had had this issue, I saw that ReadAsBinaryString has been deprecated and that I’m supposed to read the file into an ArrayBuffer instead. I’ll experiment with converting the ArrayBuffer to a string and passing it to the original code, but if that doesn’t work either some sort of #ifdef js_of_ocaml equivalent would be useful.