34
34
python-isal
35
35
===========
36
36
37
+ .. introduction start
38
+
37
39
Faster zlib and gzip compatible compression and decompression
38
40
by providing Python bindings for the ISA-L library.
39
41
@@ -43,22 +45,34 @@ Acceleration Library (ISA-L) implements several key algorithms in `assembly
43
45
language <https://en.wikipedia.org/wiki/Assembly_language> `_. This includes
44
46
a variety of functions to provide zlib/gzip-compatible compression.
45
47
46
- ``python-isal `` provides the bindings by offering an ``isal_zlib `` and
47
- ``igzip `` module which are usable as drop-in replacements for the ``zlib ``
48
- and ``gzip `` modules from the stdlib (with some minor exceptions, see below).
48
+ ``python-isal `` provides the bindings by offering three modules:
49
+
50
+ + ``isal_zlib ``: A drop-in replacement for the zlib module that uses ISA-L to
51
+ accelerate its performance.
52
+ + ``igzip ``: A drop-in replacement for the gzip module that uses ``isal_zlib ``
53
+ instead of ``zlib `` to perform its compression and checksum tasks, which
54
+ improves performance.
55
+ + ``igzip_lib ``: Provides compression functions which have full access to the
56
+ API of ISA-L's compression functions.
57
+
58
+ ``isal_zlib `` and ``igzip `` are almost fully compatible with ``zlib `` and
59
+ ``gzip `` from the Python standard library. There are some minor differences
60
+ see: differences-with-zlib-and-gzip-modules _.
49
61
50
- Usage
51
- -----
62
+ .. introduction end
52
63
53
- Python-isal has faster versions of the stdlib's `` zlib `` and `` gzip `` module
54
- these are called `` isal_zlib `` and `` igzip `` respectively.
64
+ Quickstart
65
+ ----------
55
66
56
- They can be imported as follows
67
+ .. quickstart start
68
+
69
+ The python-isal modules can be imported as follows
57
70
58
71
.. code-block :: python
59
72
60
73
from isal import isal_zlib
61
74
from isal import igzip
75
+ from isal import igzip_lib
62
76
63
77
``isal_zlib `` and ``igzip `` are meant to be used as drop in replacements so
64
78
their api and functions are the same as the stdlib's modules. Except where
@@ -68,65 +82,28 @@ A full API documentation can be found on `our readthedocs page
68
82
<https://python-isal.readthedocs.io> `_.
69
83
70
84
``python -m isal.igzip `` implements a simple gzip-like command line
71
- application (just like ``python -m gzip ``).
72
-
73
- Installation
74
- ------------
75
- Installation with pip
76
- .....................
77
-
78
- ::
79
-
80
- pip install isal
81
-
82
- Installation is supported on Linux, MacOS and Windows. On x86-64 (amd64)
83
- platforms wheels are provided, so installation should be almost instantaneous.
84
- The installation will include a staticallly linked version of ISA-L.
85
- If a wheel is not provided for your system the
86
- installation will build ISA-L first in a temporary directory. Please check the
87
- `ISA-L homepage <https://github.com/intel/isa-l >`_ for the build requirements.
88
-
89
- The latest development version of python-isal can be installed with::
85
+ application (just like ``python -m gzip ``). Full usage documentation can be
86
+ found on `our readthedocs page <https://python-isal.readthedocs.io >`_.
90
87
91
- pip install git+https://github.com/rhpvorderman/python-isal.git
92
88
93
- This requires having the build requirements installed.
94
- If you wish to link
95
- dynamically against a version of libisal installed on your system use::
89
+ .. quickstart end
96
90
97
- PYTHON_ISAL_LINK_DYNAMIC=true pip install isal --no-binary isal
98
-
99
- ISA-L is available in numerous Linux distro's as well as on conda via the
100
- conda-forge channel. Checkout the `ports documentation
101
- <https://github.com/intel/isa-l/wiki/Ports--Repos> `_ on the ISA-L project wiki
102
- to find out how to install it. It is important that the development headers
103
- are also installed.
104
-
105
- On Debian and Ubuntu the ISA-L libraries (including the development headers)
106
- can be installed with::
107
-
108
- sudo apt install libisal-dev
109
-
110
- Installation via conda
111
- ..................................
112
- Python-isal can be installed via conda, for example using
113
- the `miniconda <https://docs.conda.io/en/latest/miniconda.html >`_ installer
114
- with a properly setup `conda-forge
115
- <https://conda-forge.org/docs/user/introduction.html#how-can-i-install-packages-from-conda-forge> `_
116
- channel. When used with bioinformatics tools setting up `bioconda
117
- <http://bioconda.github.io/user/install.html#install-conda> `_
118
- provides a clear set of installation instructions for conda.
119
-
120
- python-isal is available on conda-forge and can be installed with::
91
+ Installation
92
+ ------------
93
+ - with pip: ``pip install isal ``
94
+ - with conda: ``conda install python-isal ``
121
95
122
- conda install python-isal
96
+ Installation is supported on Linux, Windows and MacOS. For more advanced
97
+ installation options check the `documentation
98
+ <https://python-isal.readthedocs.io/en/stable/index.html#installation> `_.
123
99
124
- This will automatically install the ISA-L library dependency as well, since
125
- it is available on conda-forge.
100
+ .. _differences-with-zlib-and-gzip-modules :
126
101
127
102
Differences with zlib and gzip modules
128
103
--------------------------------------
129
104
105
+ .. differences start
106
+
130
107
+ Compression level 0 in ``zlib `` and ``gzip `` means **no compression **, while
131
108
in ``isal_zlib `` and ``igzip `` this is the **lowest compression level **.
132
109
This is a design choice that was inherited from the ISA-L library.
@@ -151,8 +128,47 @@ Differences with zlib and gzip modules
151
128
to reflect this. ``igzip.GzipFile `` does exist as an alias of
152
129
``igzip.IGzipFile `` for compatibility reasons.
153
130
131
+ .. differences end
132
+
154
133
Contributing
155
134
------------
135
+ .. contributing start
136
+
156
137
Please make a PR or issue if you feel anything can be improved. Bug reports
157
138
are also very welcome. Please report them on the `github issue tracker
158
139
<https://github.com/rhpvorderman/python-isal/issues> `_.
140
+
141
+ .. contributing end
142
+
143
+ Acknowledgements
144
+ ----------------
145
+
146
+ .. acknowledgements start
147
+
148
+ This project builds upon the software and experience of many. Many thanks to:
149
+
150
+ + The `ISA-L contributors
151
+ <https://github.com/intel/isa-l/graphs/contributors> `_ for making ISA-L.
152
+ + The `Cython contributors
153
+ <https://github.com/cython/cython/graphs/contributors> `_ for making it easy
154
+ to create an extension and helping a novice get start with pointer addresses.
155
+ + The `CPython contributors
156
+ <https://github.com/python/cpython/graphs/contributors> `_.
157
+ Python-isal mimicks ``zlibmodule.c `` and ``gzip.py `` from the standard
158
+ library to make it easier for python users to adopt it.
159
+ + `@marcelm <https://github.com/marcelm >`_ for taking a chance on this project
160
+ and make it a dependency for his `xopen
161
+ <https://github.com/pycompression/xopen> `_ and by extension `cutadapt
162
+ <https://github.com/marcelm/cutadapt> `_ projects. This gave python-isal its
163
+ first users who used python-isal in production.
164
+ + The `github actions team <https://github.com/orgs/actions/people >`_ for
165
+ creating the actions CI service that enables building and testing on all
166
+ three major operating systems.
167
+ + `@animalize <https://github.com/animalize >`_ for explaining how to test and
168
+ build python-isal for ARM 64-bit platforms.
169
+ + And last but not least: everyone who submitted a bug report or a feature
170
+ request. These make the project better!
171
+
172
+ Python-isal would not have been possible without you!
173
+
174
+ .. acknowledgements end
0 commit comments