private static int MinimumBinSizeIndex(long size) { int i = Array.BinarySearch(BinSizes, (int)size); if (i < 0) { i = -(i + 1); } return i; }