[New-bugs-announce] [issue25626] Gzip fails for file over 2**32 bytes

Ben Cipollini report at bugs.python.org
Sat Nov 14 14:48:21 EST 2015

New submission from Ben Cipollini:

Gzip fails when opening a file more than 2**32 bytes. This is a new issue in Python 3.5.

We hit this opening large neuroimaging files from the Human Connectome Project. See https://github.com/nipy/nibabel/issues/362 for more details.

When size is > 2**32, we get the following error on Python 3.5:

/usr/lib/python3.5/gzip.py in read(self, size)
    467             buf = self._fp.read(io.DEFAULT_BUFFER_SIZE)
--> 469             uncompress = self._decompressor.decompress(buf, size)
    470             if self._decompressor.unconsumed_tail != b"":
    471                 self._fp.prepend(self._decompressor.unconsumed_tail)

OverflowError: Python int too large for C unsigned int

messages: 254668
nosy: Ben Cipollini
priority: normal
severity: normal
status: open
title: Gzip fails for file over 2**32 bytes
type: crash
versions: Python 3.5

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list