| 1 |
inflate64 |
| 2 |
========= |
| 3 |
|
| 4 |
.. image:: https://badge.fury.io/py/inflate64.svg |
| 5 |
:target: https://badge.fury.io/py/inflate64 |
| 6 |
|
| 7 |
.. image:: https://github.com/miurahr/inflate64/actions/workflows/run-tox-tests.yml/badge.svg?branch=main |
| 8 |
:target: https://github.com/miurahr/inflate64/actions/workflows/run-tox-tests.yml |
| 9 |
|
| 10 |
.. image:: https://ci.codeberg.org/api/badges/12505/status.svg |
| 11 |
:target: https://ci.codeberg.org/repos/12505 |
| 12 |
|
| 13 |
|
| 14 |
The ``inflate64`` is a python package to provide ``Deflater`` and ``Inflater`` class to compress and |
| 15 |
decompress with Enhanced Deflate compression algorithm. |
| 16 |
|
| 17 |
The project is in ``Production/Stable`` status. |
| 18 |
|
| 19 |
How to use |
| 20 |
---------- |
| 21 |
|
| 22 |
You can install it with ``pip`` command as usual. |
| 23 |
|
| 24 |
.. code-block:: |
| 25 |
|
| 26 |
pip install inflate64 |
| 27 |
|
| 28 |
|
| 29 |
You can extract compressed data by instantiating ``Inflater`` class and call ``inflate`` method. |
| 30 |
|
| 31 |
.. code-block:: python |
| 32 |
|
| 33 |
import inflate64 |
| 34 |
decompressor = inflate64.Inflater() |
| 35 |
extracted = decompressor.inflate(data) |
| 36 |
|
| 37 |
|
| 38 |
You can also compress data by instantiating ``Deflater`` class and call ``deflate`` method. |
| 39 |
|
| 40 |
.. code-block:: python |
| 41 |
|
| 42 |
import inflate64 |
| 43 |
compressor = inflate64.Deflater() |
| 44 |
compressed = compressor.deflate(data) |
| 45 |
compressed += compressor.flush() |
| 46 |
|
| 47 |
|
| 48 |
License |
| 49 |
------- |
| 50 |
|
| 51 |
This library is free software; you can redistribute it and/or |
| 52 |
modify it under the terms of the GNU Lesser General Public |
| 53 |
License as published by the Free Software Foundation; either |
| 54 |
version 2.1 of the License, or (at your option) any later version. |
| 55 |
|
| 56 |
This library is distributed in the hope that it will be useful, |
| 57 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 58 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 59 |
Lesser General Public License for more details. |
| 60 |
|
| 61 |
You should have received a copy of the GNU Lesser General Public |
| 62 |
License along with this library; if not, write to the Free Software |
| 63 |
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 64 |
|
| 65 |
.. note:: |
| 66 |
Please note that Enhanced Deflate algorithm is also known as `DEFLATE64` :sup:`TM` |
| 67 |
that is a registered trademark of `PKWARE, Inc.` |