function makeJumpBuffer(availability) {
  let entityId = 0;
  const bufferLength = availability.lengthBits;
  const availableCount = availability.availableCount;

  let jumpBuffer;
  if (availableCount < 256) {
    jumpBuffer = new Uint8Array(bufferLength);
  } else if (availableCount < 65536) {
    jumpBuffer = new Uint16Array(bufferLength);
  } else {
    jumpBuffer = new Uint32Array(bufferLength);
  }

  for (let i = 0; i < availability.lengthBits; i++) {
    if (availability.getBit(i)) {
      jumpBuffer[i] = entityId;
      entityId++;
    }
  }

  return jumpBuffer;
}
Make a jump buffer, i.e. a map of a bit index to the metadata entity ID.
<p>
For unavailable tiles and content, the jump buffer entries will be uninitialized.
Use the tile and content availability to determine whether a jump buffer value is valid.
</p>

@param {ImplicitAvailabilityBitstream} availability The availability bitstream to create the jump buffer from.
@returns {Array} The resulting jump buffer.
@private