We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b3acc90 commit 4684495Copy full SHA for 4684495
src/isal/igzip_lib.pyx
@@ -321,7 +321,7 @@ cdef class IgzipDecompressor:
321
break
322
return obuf
323
324
- def decompress(self, data, Py_ssize_t max_length = 0):
+ def decompress(self, data, Py_ssize_t max_length = -1):
325
"""
326
Decompress data, returning a bytes object containing the uncompressed
327
data corresponding to at least part of the data in string.
@@ -335,10 +335,8 @@ cdef class IgzipDecompressor:
335
cdef bint input_buffer_in_use
336
337
cdef Py_ssize_t hard_limit
338
- if max_length == 0:
+ if max_length < 0:
339
hard_limit = PY_SSIZE_T_MAX
340
- elif max_length < 0:
341
- raise ValueError("max_length can not be smaller than 0")
342
else:
343
hard_limit = max_length
344
0 commit comments