File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -249,12 +249,6 @@ def __init__(self, fp):
249
249
self ._new_member = True
250
250
self ._last_mtime = None
251
251
252
- def _add_read_data (self , data ):
253
- # Use faster isal crc32 calculation and update the stream size in place
254
- # compared to CPython gzip
255
- self ._crc = isal_zlib .crc32 (data , self ._crc )
256
- self ._stream_size += len (data )
257
-
258
252
def read (self , size = - 1 ):
259
253
if size < 0 :
260
254
return self .readall ()
@@ -302,7 +296,8 @@ def read(self, size=-1):
302
296
raise EOFError ("Compressed file ended before the "
303
297
"end-of-stream marker was reached" )
304
298
305
- self ._add_read_data (uncompress )
299
+ self ._crc = isal_zlib .crc32 (uncompress , self ._crc )
300
+ self ._stream_size += len (uncompress )
306
301
self ._pos += len (uncompress )
307
302
return uncompress
308
303
You can’t perform that action at this time.
0 commit comments