bit-array
bit-array copied to clipboard
Extending values array beyond the initialized length does not set values to zeroes
vat bits = new BitArray(); bits.set(6000,true); bits.toJSON();
This is on purpose. I needed to transfer the JSON representation over the wire and left out anything that wasn't defined. (Assuming the receiving end knows about this convention.)
Setting one bit in a 32 bit value sets them all, so it's not really possible to detect what bits were set and which were not consistently and "null" takes more characters on the wire than "0".