Skip to content

Commit 4b751c3

Browse files
committed
Add some extra chapters
1 parent 1d0a81e commit 4b751c3

File tree

3 files changed

+67
-3
lines changed

3 files changed

+67
-3
lines changed

README.rst

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@
3434
python-isal
3535
===========
3636

37+
.. introduction start
38+
3739
Faster zlib and gzip compatible compression and decompression
3840
by providing Python bindings for the ISA-L library.
3941

@@ -47,8 +49,12 @@ a variety of functions to provide zlib/gzip-compatible compression.
4749
``igzip`` module which are usable as drop-in replacements for the ``zlib``
4850
and ``gzip`` modules from the stdlib (with some minor exceptions, see below).
4951

50-
Usage
51-
-----
52+
.. introduction end
53+
54+
Quickstart
55+
----------
56+
57+
.. usage start
5258
5359
Python-isal has faster versions of the stdlib's ``zlib`` and ``gzip`` module
5460
these are called ``isal_zlib`` and ``igzip`` respectively.
@@ -70,18 +76,22 @@ A full API documentation can be found on `our readthedocs page
7076
``python -m isal.igzip`` implements a simple gzip-like command line
7177
application (just like ``python -m gzip``).
7278

79+
.. usage end
80+
7381
Installation
7482
------------
7583
- with pip: ``pip install isal``
7684
- with conda: ``conda install python-isal``
7785

7886
Installation is supported on Linux, Windows and MacOS. For more advanced
7987
installation options check the `documentation
80-
<https://python-isal.readthedocs.io>`_.
88+
<https://python-isal.readthedocs.io/en/stable/index.html#installation>`_.
8189

8290
Differences with zlib and gzip modules
8391
--------------------------------------
8492

93+
.. differences start
94+
8595
+ Compression level 0 in ``zlib`` and ``gzip`` means **no compression**, while
8696
in ``isal_zlib`` and ``igzip`` this is the **lowest compression level**.
8797
This is a design choice that was inherited from the ISA-L library.
@@ -106,8 +116,14 @@ Differences with zlib and gzip modules
106116
to reflect this. ``igzip.GzipFile`` does exist as an alias of
107117
``igzip.IGzipFile`` for compatibility reasons.
108118

119+
.. differences end
120+
109121
Contributing
110122
------------
123+
.. contributing start
124+
111125
Please make a PR or issue if you feel anything can be improved. Bug reports
112126
are also very welcome. Please report them on the `github issue tracker
113127
<https://github.com/rhpvorderman/python-isal/issues>`_.
128+
129+
.. contributing end

docs/includes/README.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../README.rst

docs/index.rst

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,57 @@ Welcome to python-isal's documentation!
1111
:maxdepth: 2
1212
:caption: Contents:
1313

14+
============
15+
Introduction
16+
============
17+
18+
.. include:: includes/README.rst
19+
:start-after: .. introduction start
20+
:end-before: .. introduction end
21+
22+
==========
23+
Quickstart
24+
==========
25+
26+
Python-isal has faster versions of the stdlib's ``zlib`` and ``gzip`` module
27+
these are called ``isal_zlib`` and ``igzip`` respectively.
28+
29+
They can be imported as follows
30+
31+
.. code-block:: python
32+
33+
from isal import isal_zlib
34+
from isal import igzip
35+
36+
``isal_zlib`` and ``igzip`` are meant to be used as drop in replacements so
37+
their api and functions are the same as the stdlib's modules. Except where
38+
ISA-L does not support the same calls as zlib (See differences below).
39+
40+
A full API documentation can be found below.
41+
42+
``python -m isal.igzip`` implements a simple gzip-like command line
43+
application (just like ``python -m gzip``).
44+
45+
1446
.. include:: includes/Installation.rst
1547

48+
======================================
49+
Differences with zlib and gzip modules
50+
======================================
51+
52+
.. include:: includes/README.rst
53+
:start-after: .. differences start
54+
:end-before: .. differences end
55+
1656
.. include:: includes/isal_zlib.rst
1757

1858
.. include:: includes/igzip.rst
1959

60+
============
61+
Contributing
62+
============
63+
.. include:: includes/README.rst
64+
:start-after: .. contributing start
65+
:end-before: .. contributing end
66+
2067
.. include:: includes/CHANGELOG.rst

0 commit comments

Comments
 (0)