File tree Expand file tree Collapse file tree 2 files changed +3
-8
lines changed Expand file tree Collapse file tree 2 files changed +3
-8
lines changed Original file line number Diff line number Diff line change 9
9
# Changes compared to CPython:
10
10
# - Subclassed GzipFile to IGzipFile. Methods that included calls to zlib have
11
11
# been overwritten with the same methods, but now calling to isal_zlib.
12
- # - _GzipReader uses a igzip_lib.IgzipDecompressor. This Decompressor is
13
- # derived from the BZ2Decompressor as such it does not produce an unconsumed
14
- # tail but keeps the read data internally. This prevents unnecessary copying
15
- # of data. To accomodate this, the read method has been rewritten.
16
- # - _GzipReader._add_read_data uses isal_zlib.crc32 instead of zlib.crc32.
12
+ # - _GzipReader is implemented in C in isal_zlib and allows dropping the GIL.
17
13
# - Gzip.compress does not use a GzipFile to compress in memory, but creates a
18
14
# simple header using _create_simple_gzip_header and compresses the data with
19
15
# igzip_lib.compress using the DECOMP_GZIP_NO_HDR flag. This change was
Original file line number Diff line number Diff line change @@ -14,14 +14,13 @@ Changes compared to CPython:
14
14
- Zlib to ISA-L conversion functions were included.
15
15
- All compression and checksum functions from zlib replaced with ISA-L
16
16
compatible functions.
17
- - No locks in Compress and Decompress objects. These were deemed unnecessary
18
- as the ISA-L functions do not allocate memory, unlike the zlib
19
- counterparts.
20
17
- zlib.compress also has a 'wbits' argument. This change was included in
21
18
Python 3.11. It allows for faster gzip compression by using
22
19
isal_zlib.compress(data, wbits=31).
23
20
- Argument parsers were written using th CPython API rather than argument
24
21
clinic.
22
+ - Created a GzipReader class that implements gzip reading in C, reducing a lot
23
+ of overhead compared to the gzip.py:_GzipReader class.
25
24
*/
26
25
27
26
#include "isal_shared.h"
You can’t perform that action at this time.
0 commit comments