Open
Description
Typed array constructors can take an ArrayBuffer instance as single argument. E.g.:
let buffer = new ArrayBuffer(12);
new Uint32Array(buffer);
The length of the typed array is the length of the buffer, divided by the TypedArray.BYTES_PER_ELEMENT.
If applied to BitArrays, that would imply the length of BitArrays can only be multiple of 8. However, there is no reason that length of bit arrays should be so. Hence, I have written:
I have not yet made my mind whether it makes sense to construct a
BitArray
by passing an array buffer to the constructor.
This issue is created to open the discussion.
Metadata
Metadata
Assignees
Labels
No labels