NullBufferSize determines the maximum size of NULL byte blocks written to files when falling back to WriteSeeker.
const NullBufferSize = 512 * 1024 // 512 KiB
func File(file *os.File, size int64) error
File preallocates a file via syscall (when supported) or WriteSeeker.
func TempFile(dir string, pattern string, size int64) (*os.File, error)
TempFile preallocates a temporary file (see File and ioutil.TempFile).
func WriteSeeker(w io.WriteSeeker, size int64) error
WriteSeeker preallocates an io.WriteSeeker by writing null bytes.