Skip to content

Commit dcd7db2

Browse files
committed
Unused_data is always generated to ensure bitbuffer is read.
1 parent 9f2e4ac commit dcd7db2

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/isal/igzip_lib.pyx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -481,9 +481,8 @@ cdef class IgzipDecompressor:
481481
return b""
482482
if self.eof:
483483
self.needs_input = False
484-
if self.avail_in_real > 0:
485-
new_data = PyBytes_FromStringAndSize(<char *>self.stream.next_in, self.avail_in_real)
486-
self.unused_data = self._view_bitbuffer() + new_data
484+
new_data = PyBytes_FromStringAndSize(<char *>self.stream.next_in, self.avail_in_real)
485+
self.unused_data = self._view_bitbuffer() + new_data
487486
elif self.avail_in_real == 0:
488487
self.stream.next_in = NULL
489488
self.needs_input = True

0 commit comments

Comments
 (0)