static CloneBuffers() { var random = new Random(RandSeed); DataSetArrayUnfixed <byte> MakeDataSet(long length) => new(random, length); long start = MinSize; bool makeEmpty = start == 0; int requiredSize = (makeEmpty ? 1 : 0) + (BitOperations.Log2((uint)MaxSize) - BitOperations.Log2((uint)MinSize)) + 1; var dataSets = new List <DataSetArrayUnfixed <byte> >(requiredSize); if (makeEmpty) { var dataSet = MakeDataSet(start); //dataSets.Add(dataSet); start = 1; } if (MaxSize == MinSize) { if (MaxSize != 0) { var dataSet = MakeDataSet(MaxSize); dataSets.Add(dataSet); } } else { for (long i = start; i <= MaxSize; i *= 2) { //var halfIndex = (i >> 1) + (i >> 2); //if (halfIndex != 0 && halfIndex != i) { // dataSets.Add(MakeDataSet(halfIndex)); //} dataSets.Add(MakeDataSet(i)); } } DataSets.AddRange(dataSets); }