Usage of typed arrays in javascript

Pretty drafty, there is maybe room for improvements and better
handling of data views and endianess management for example. In
the end not as simple/understandable as expected.