public static void Fill(this IStorage input, byte value, long offset, long count, IProgressReport progress = null) { const int threshold = 0x400; if (count > threshold) { input.FillLarge(value, offset, count, progress); return; } Span <byte> buf = stackalloc byte[(int)count]; buf.Fill(value); input.Write(buf, offset); }