ocsigen / js_of_ocaml

Compiler from OCaml to Javascript.
http://ocsigen.org/js_of_ocaml/
Other
952 stars 186 forks source link

Add Typed_array.Bytes module #1609

Closed johnridesabike closed 5 months ago

johnridesabike commented 5 months ago

This adds an API in Typed_array for converting uint8Array values into bytes. Because the runtime uses uint8Array internally to represent bytes, this doesn't need to copy anything. Modifying the resulting bytes will also modify the original uint8Array.