Skip to content

Commit 66589cf

Browse files
committed
Do nothing when flush is called with no flush
1 parent f909a6a commit 66589cf

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/isal/isal_zlib.pyx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,10 @@ cdef class Compress:
362362
PyBuffer_Release(buffer)
363363

364364
def flush(self, int mode=FULL_FLUSH):
365+
if mode == NO_FLUSH:
366+
# Flushing with no_flush does nothing.
367+
return b""
368+
365369
# Initialise stream
366370
self.stream.flush = mode
367371
self.stream.end_of_stream = 1

0 commit comments

Comments
 (0)