@@ -43,6 +43,29 @@ a variety of functions to provide zlib/gzip-compatible compression.
43
43
``igzip `` module which are usable as drop-in replacements for the ``zlib ``
44
44
and ``gzip `` modules from the stdlib (with some minor exceptions, see below).
45
45
46
+ Usage
47
+ -----
48
+
49
+ Python-isal has faster versions of the stdlib's ``zlib `` and ``gzip `` module
50
+ these are called ``isal_zlib `` and ``igzip `` respectively.
51
+
52
+ They can be imported as follows
53
+
54
+ .. code-block :: python
55
+
56
+ from isal import isal_zlib
57
+ from isal import igzip
58
+
59
+ ``isal_zlib `` and ``igzip `` were meant to be used as drop in replacements so
60
+ their api and functions are the same as the stdlib's modules. Except where
61
+ isa-l does not support the same calls as zlib (See differences below).
62
+
63
+ A full API documentation can be found on `our readthedocs page
64
+ <https://python-isal.readthedocs.io> `_.
65
+
66
+ ``python -m isal.igzip `` implements a simple gzip-like command line
67
+ application (just like ``python -m gzip ``).
68
+
46
69
Installation
47
70
------------
48
71
Installation with pip
@@ -99,30 +122,6 @@ python-isal is available on conda-forge and can be installed with
99
122
This will automatically install the isa-l library dependency as well, since
100
123
it is available on conda-forge.
101
124
102
-
103
- Usage
104
- -----
105
-
106
- Python-isal has faster versions of the stdlib's ``zlib `` and ``gzip `` module
107
- these are called ``isal_zlib `` and ``igzip `` respectively.
108
-
109
- They can be imported as follows
110
-
111
- .. code-block :: python
112
-
113
- from isal import isal_zlib
114
- from isal import igzip
115
-
116
- ``isal_zlib `` and ``igzip `` were meant to be used as drop in replacements so
117
- their api and functions are the same as the stdlib's modules. Except where
118
- isa-l does not support the same calls as zlib (See differences below).
119
-
120
- A full API documentation can be found on `our readthedocs page
121
- <https://python-isal.readthedocs.io> `_.
122
-
123
- ``python -m isal.igzip `` implements a simple gzip-like command line
124
- application (just like ``python -m gzip ``).
125
-
126
125
Differences with zlib and gzip modules
127
126
--------------------------------------
128
127
@@ -140,13 +139,14 @@ Differences with zlib and gzip modules
140
139
``isal_zlib `` supports memory levels smallest, small, medium, large and
141
140
largest. These have been mapped to levels 1, 2-3, 4-6, 7-8 and 9. So
142
141
``isal_zlib `` can be used with zlib compatible memory levels.
143
- + ``isal_zlib `` only supports ``FLUSH ``, ``SYNC_FLUSH `` and ``FULL_FLUSH ``
144
- ``FINISH `` is aliased to ``FULL_FLUSH `` (and works correctly as such).
145
142
+ ``isal_zlib `` has a ``compressobj `` and ``decompressobj `` implementation.
146
143
However, the unused_data and unconsumed_tail for the Decompress object, only
147
144
work properly when using gzip compatible compression. (25 <= wbits <= 31).
148
145
+ The flush implementation for the Compress object behavious differently from
149
- the zlib equivalent.
146
+ the zlib equivalent. The flush implementation is sufficient for
147
+ the ``igzip `` module to work 100% in compliance with the ``gzip `` tests from
148
+ CPython. It does not however work for the ``zlib `` compliance tests. This
149
+ is an area that still needs work.
150
150
151
151
Contributing
152
152
------------
0 commit comments