`Tarray.{of,to}_binary_jstr`: unclear doc, dead link
Tarray.{of,to}_binary_jstr mention "Javascript binary string", but the link is dead and searching "Javascript binary string" does not yield much (the concept appears to have been deprecated in favour of typed arrays).
Is it the case that the Jstr.t in these functoins encode one byte per UTF-16 unit?
Thanks for the nice library! (If only it had existed when gen_js_api was introduced, maybe we could have avoided having two incompatible types for OCaml/JS FFI).
Is it the case that the
Jstr.tin these functoins encode one byte per UTF-16 unit?
Answering to myself: yes, looks like it is the case:
https://github.com/dbuenzli/brr/blob/25f991e9021c0c5a306e2605dd1148fb3334f499/src/brr.ml#L734-L745
I suspect that Tarray.to_binary_jstr is the composition fun x -> Jstr.binary_of_octets (Tarray.to_string x). If that's the case, it could be useful to mention this in the docstring. Otherwise, it may be good to explain the difference.
Anyway, nothing left to do here. Sorry for the noise!
Well the doc link should be fixed or the definition of a binary string be inlined. It seems that indeed the thing vanished from MDN. The only (indirect) reference I can find now is https://w3c.github.io/FileAPI/#packaging-data
Thanks!
Thanks, report about dangling docs are particularly appreciated.