createNullMap method

List<int> createNullMap()

Implementation

List<int> createNullMap() {
  var bytes = ((_values.length + 7) / 8).floor().toInt();
  var nullMap = List<int>.filled(bytes, 0);
  var byte = 0;
  var bit = 0;
  for (var i = 0; i < _values.length; i++) {
    if (_values[i] == null) {
      nullMap[byte] = nullMap[byte] + (1 << bit);
    }
    bit++;
    if (bit > 7) {
      bit = 0;
      byte++;
    }
  }

  return nullMap;
}