Package preallocate allocates disk space efficiently via syscall (on supported platforms and filesystems) or by writing null bytes.
Files opened with O_APPEND are not supported.
NullBufferSize determines the maximum size of NULL byte blocks written to files when falling back to WriteSeeker.
const NullBufferSize = 512 * 1024 // 512 KiB
File preallocates a file via syscall (when supported) or WriteSeeker.
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.