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 99# Changes compared to CPython:
1010# - Subclassed GzipFile to IGzipFile. Methods that included calls to zlib have
1111# 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.
1713# - Gzip.compress does not use a GzipFile to compress in memory, but creates a
1814# simple header using _create_simple_gzip_header and compresses the data with
1915# 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:
1414- Zlib to ISA-L conversion functions were included.
1515- All compression and checksum functions from zlib replaced with ISA-L
1616 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.
2017- zlib.compress also has a 'wbits' argument. This change was included in
2118 Python 3.11. It allows for faster gzip compression by using
2219 isal_zlib.compress(data, wbits=31).
2320- Argument parsers were written using th CPython API rather than argument
2421 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.
2524*/
2625
2726#include "isal_shared.h"
You can’t perform that action at this time.
0 commit comments