[Python-Dev] [Python-checkins] cpython (2.7): Issue #10276: test_zlib checks that inputs of 2 GB are handled correctly by
p.f.moore at gmail.com
Thu May 5 11:53:59 CEST 2011
On 5 May 2011 10:33, Victor Stinner <victor.stinner at haypocalc.com> 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...
More information about the Python-Dev