On 5 May 2011 10:33, Victor Stinner <[email protected]> wrote: > If you write a byte after 2 GB of zeros, the file size is 2 GB+the few > bytes. This trick is to create quickly a large file: some OSes support > sparse files, zeros are not written on disk. But on Mac OS X and > Windows, you really write 2 GB+some bytes.
FWIW, on Windows you can create sparse files, using DeviceIoControl(FILE_SET_SPARSE). It's probably too messy to be worth it for this case, though... Paul _______________________________________________ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
