You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't think this is currently possible with an array. I would recommend using the getCode() method to understand why. For your example, each loop iteration is reading in 24 bits. $tmp2 = (dataView.getUint16(offset) << 8) | dataView.getUint8(offset + 2);. Any leftover bits will be dropped.
There is a hacky way to accomplish this, but you can't use the Array type. This may or may not make sense for your application. I would make sure the array as a whole is a multiple of 8 bits. Also be careful with nested bit fields. There are some issues if you have a nest inside a nest.
Is it possible to have an array that isn't aligned to 8bits?
https://stackblitz.com/edit/stackblitz-starters-cxezrc?file=index.js
The text was updated successfully, but these errors were encountered: