code: function bitArrayToArray(bitArray) {
      let resultArray = [];
      for (let index = 0; index < bitArray.byteLength; index++) {
          let arrayByte = bitArray.readUInt8(index);
          // Skip bit operations if zero -> no bit is set
          if (arrayByte !== 0) {
              for (let bitIndex = 0; bitIndex < 8; bitIndex++) {
                  if ((arrayByte & 0x01) === 0x01) {
                      resultArray.push(index * 8 + bitIndex);
                  }
                  arrayByte = arrayByte >>> 1;
              }
          }
      }
      return resultArray;
  }
docs: Converts a binary bit array to an array of numbers.
  
  @export
  @param {Buffer} bitArray Bytes where each bit is set for the corresponding number, e.g. the node ID.
  @returns {number[]} Returns an array of numbers with an entry for each set bit.