Create typed array from array buffer for reading.

We were reading from an array buffer which does not work and was causing all the headerData to be zeroed.