File tree Expand file tree Collapse file tree 2 files changed +10
-11
lines changed Expand file tree Collapse file tree 2 files changed +10
-11
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,10 @@ version develop
11
11
-----------------
12
12
+ Python 3.14 is supported.
13
13
+ Python 3.8 and 3.9 are no longer supported.
14
+ + Fix an issue where flushing using igzip_threaded caused a gzip end of stream
15
+ and started a new gzip stream. In essence creating a concatenated gzip
16
+ stream. Now it is in concordance with how single threaded gzip streams
17
+ are flushed using Z_SYNC_FLUSH.
14
18
+ Switched to setuptools-scm for building the package rather than versioningit.
15
19
+ Test files are added to the source distribution.
16
20
Original file line number Diff line number Diff line change @@ -321,30 +321,25 @@ def write(self, b) -> int:
321
321
self .input_queues [worker_index ].put ((data , zdict ))
322
322
return len (data )
323
323
324
- def _end_gzip_stream (self ):
324
+ def flush (self ):
325
325
self ._check_closed ()
326
326
# Wait for all data to be compressed
327
327
for in_q in self .input_queues :
328
328
in_q .join ()
329
329
# Wait for all data to be written
330
330
for out_q in self .output_queues :
331
331
out_q .join ()
332
- # Write an empty deflate block with a lost block marker.
332
+ self .raw .flush ()
333
+
334
+ def close (self ):
335
+ if self ._closed :
336
+ return
333
337
self .raw .write (zlib_ng .compress (b"" , wbits = - 15 ))
334
338
trailer = struct .pack ("<II" , self ._crc , self ._size & 0xFFFFFFFF )
335
339
self .raw .write (trailer )
336
340
self ._crc = 0
337
341
self ._size = 0
338
342
self .raw .flush ()
339
-
340
- def flush (self ):
341
- self ._end_gzip_stream ()
342
- self ._write_gzip_header ()
343
-
344
- def close (self ) -> None :
345
- if self ._closed :
346
- return
347
- self ._end_gzip_stream ()
348
343
self .stop ()
349
344
if self .exception :
350
345
self .raw .close ()
You can’t perform that action at this time.
0 commit comments