Skip to content

Commit 4e19a12

Browse files
committed
Fix small oversight
1 parent 54de011 commit 4e19a12

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/isal/igzip_lib.pyx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,6 @@ cdef class IgzipDecompressor:
298298
view_bitbuffer(&self.stream)
299299

300300
cdef unsigned char * decompress_buf(self, Py_ssize_t max_length):
301-
cdef Py_ssize_t data_size = 0
302301
cdef unsigned char * obuf = NULL
303302
cdef Py_ssize_t obuflen = DEF_BUF_SIZE_I
304303
cdef int err
@@ -312,17 +311,14 @@ cdef class IgzipDecompressor:
312311
break
313312
arrange_input_buffer(&self.stream, &self.avail_in_real)
314313
err = isal_inflate(&self.stream)
315-
data_size = self.stream.next_out - obuf
314+
self.avail_in_real += self.stream.avail_in
316315
if err != ISAL_DECOMP_OK:
317316
check_isal_inflate_rc(err)
318317
if self.stream.block_state == ISAL_BLOCK_FINISH:
319318
self.eof = 1
320319
break
321320
elif self.avail_in_real == 0:
322321
break
323-
elif self.stream.avail_out == 0:
324-
if data_size == max_length:
325-
break
326322
return obuf
327323

328324
def decompress(self, data, Py_ssize_t max_length = 0):

0 commit comments

Comments
 (0)