When sending the data as binary, the blob is directly fed into a TypedArray in the JS part. Apparently, this only works if the original data was in little-endian order before encoding to binary.
In the h5grove demo, each time we fetch data in binary format, we make sure that the data can be correctly decoded by using the query parameter dtype=safe:
It makes sure that it has a dtype that has equivalent in JS
Fix https://github.com/silx-kit/h5web/issues/1421#issuecomment-1515811198
When sending the data as binary, the blob is directly fed into a
TypedArray
in the JS part. Apparently, this only works if the original data was in little-endian order before encoding to binary.In the
h5grove
demo, each time we fetch data in binary format, we make sure that the data can be correctly decoded by using the query parameterdtype=safe
:(see https://github.com/silx-kit/h5grove/blob/5b71298493ef180c4202bb2179cddd90316fb82d/h5grove/utils.py#L129 for the relevant method)
In the JupyterLab ext, I forgot to parse the
dtype
parameter so that this condition wasn't respected for big-endians. This PR fixes this.