code: func lengthForCardinality(cardinality int) uint {
  	length := closestBase2(cardinality) * loadFactor
  	var minLength = math.Exp2(16) // 8kb
  	var maxLength = math.Exp2(20) // 128kb
  	return uint(math.Max(minLength, math.Min(length, maxLength)))
  }
docs: // bit map length is proportinal to the estimated cardinality, it can be between 8 and 128kb,
  // those numbers were chosen in order to achieve a relatively low error rate while keeping a low memory usage.