3434python-isal
3535===========
3636
37+ .. introduction start
38+
3739 Faster zlib and gzip compatible compression and decompression
3840by providing Python bindings for the ISA-L library.
3941
@@ -43,22 +45,34 @@ Acceleration Library (ISA-L) implements several key algorithms in `assembly
4345language <https://en.wikipedia.org/wiki/Assembly_language> `_. This includes
4446a variety of functions to provide zlib/gzip-compatible compression.
4547
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 _.
4961
50- Usage
51- -----
62+ .. introduction end
5263
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+ ----------
5566
56- They can be imported as follows
67+ .. quickstart start
68+
69+ The python-isal modules can be imported as follows
5770
5871.. code-block :: python
5972
6073 from isal import isal_zlib
6174 from isal import igzip
75+ from isal import igzip_lib
6276
6377 ``isal_zlib `` and ``igzip `` are meant to be used as drop in replacements so
6478their 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
6882<https://python-isal.readthedocs.io> `_.
6983
7084``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 >`_.
9087
91- pip install git+https://github.com/rhpvorderman/python-isal.git
9288
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
9690
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 ``
12195
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> `_.
12399
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 :
126101
127102Differences with zlib and gzip modules
128103--------------------------------------
129104
105+ .. differences start
106+
130107 + Compression level 0 in ``zlib `` and ``gzip `` means **no compression **, while
131108 in ``isal_zlib `` and ``igzip `` this is the **lowest compression level **.
132109 This is a design choice that was inherited from the ISA-L library.
@@ -151,8 +128,47 @@ Differences with zlib and gzip modules
151128 to reflect this. ``igzip.GzipFile `` does exist as an alias of
152129 ``igzip.IGzipFile `` for compatibility reasons.
153130
131+ .. differences end
132+
154133 Contributing
155134------------
135+ .. contributing start
136+
156137 Please make a PR or issue if you feel anything can be improved. Bug reports
157138are also very welcome. Please report them on the `github issue tracker
158139<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