code: function bitsToLayout(bits) {
    var idx = 0
    const map = {}
    for (const [ name, b ] of bits) {
      const mask = maskForBits(b)
      map[name] = [ idx, mask ]
      idx += b
    }
    return map
  }
docs: Takes a table of properties with bit length and derives bit layout from it.
  The bit layout is a hash map indexed by property name and each entry contains
  the index of the property in the bit field and it's mask needed to isolate it.
  
  ### Example:
  
  ```
  bitsToLayout([ [ 'foo', 2 ], [ 'bar', 4 ] ])
  // => { foo: [ 0, 0b11 ], bar: [ 2, 0b1111 ] }
  ```
  
  @name bitsToLayout
  
  @param {Array.<Array<String, Number>>} bits
  @returns {Object.<Array.<Number, Number>>}