|
1 |
| -// Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, |
2 |
| -// 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022 |
3 |
| -// Python Software Foundation; All Rights Reserved |
4 |
| - |
5 |
| -// This file is part of python-isal which is distributed under the |
6 |
| -// PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2. |
7 |
| - |
8 |
| -// This file was modified from Cpython's Modules/zlibmodule.c file. |
9 |
| -// Changes compared to CPython: |
10 |
| -// - All zlib naming changed to isal_zlib |
11 |
| -// - Including a few constants that are more specific to the ISA-L library |
12 |
| -// (ISAL_DEFAULT_COMPRESSION etc). |
13 |
| -// - Zlib to ISA-L conversion functions were included. |
14 |
| -// - All compression and checksum functions from zlib replaced with ISA-L |
15 |
| -// compatible functions. |
16 |
| -// - No locks in Compress and Decompress objects. These were deemed unnecessary |
17 |
| -// as the ISA-L functions do not allocate memory, unlike the zlib |
18 |
| -// counterparts. |
19 |
| -// - zlib.compress also has a 'wbits' argument. This change was included in |
20 |
| -// Python 3.11. It allows for faster gzip compression by using |
21 |
| -// isal_zlib.compress(data, wbits=31). |
22 |
| -// - Argument parsers were written using th CPython API rather than argument |
23 |
| -// clinic. |
24 |
| - |
| 1 | +/* |
| 2 | +Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, |
| 3 | +2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022 |
| 4 | +Python Software Foundation; All Rights Reserved |
| 5 | +
|
| 6 | +This file is part of python-isal which is distributed under the |
| 7 | +PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2. |
| 8 | +
|
| 9 | +This file was modified from Cpython's Modules/zlibmodule.c file. |
| 10 | +Changes compared to CPython: |
| 11 | +- All zlib naming changed to isal_zlib |
| 12 | +- Including a few constants that are more specific to the ISA-L library |
| 13 | + (ISAL_DEFAULT_COMPRESSION etc). |
| 14 | +- Zlib to ISA-L conversion functions were included. |
| 15 | +- All compression and checksum functions from zlib replaced with ISA-L |
| 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 | +- zlib.compress also has a 'wbits' argument. This change was included in |
| 21 | + Python 3.11. It allows for faster gzip compression by using |
| 22 | + isal_zlib.compress(data, wbits=31). |
| 23 | +- Argument parsers were written using th CPython API rather than argument |
| 24 | + clinic. |
| 25 | +*/ |
25 | 26 |
|
26 | 27 | #include "isal_shared.h"
|
27 | 28 |
|
@@ -1241,7 +1242,6 @@ PyInit_isal_zlib(void)
|
1241 | 1242 | PyModule_AddIntConstant(m, "DEFLATED", Z_DEFLATED);
|
1242 | 1243 | PyModule_AddIntMacro(m, DEF_MEM_LEVEL);
|
1243 | 1244 | PyModule_AddIntMacro(m, DEF_BUF_SIZE);
|
1244 |
| - // compression levels |
1245 | 1245 | // No compression is not supported by ISA-L. Throw an error if chosen.
|
1246 | 1246 | // PyModule_AddIntMacro(m, Z_NO_COMPRESSION);
|
1247 | 1247 | PyModule_AddIntConstant(m, "Z_BEST_SPEED", ISAL_DEF_MIN_LEVEL);
|
|
0 commit comments