zlib-ng


Namezlib-ng JSON
Version 0.5.1 PyPI version JSON
download
home_pagehttps://github.com/pycompression/python-zlib-ng
SummaryDrop-in replacement for zlib and gzip modules using zlib-ng
upload_time2024-09-25 08:05:16
maintainerNone
docs_urlNone
authorLeiden University Medical Center
requires_python>=3.8
licensePSF-2.0
keywords zlib-ng zlib compression deflate gzip
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            .. image:: https://img.shields.io/pypi/v/zlib-ng.svg
  :target: https://pypi.org/project/zlib-ng/
  :alt:

.. image:: https://img.shields.io/conda/v/conda-forge/python-zlib-ng.svg
  :target: https://github.com/conda-forge/python-zlib-ng-feedstock
  :alt:

.. image:: https://img.shields.io/pypi/pyversions/zlib-ng.svg
  :target: https://pypi.org/project/zlib-ng/
  :alt:

.. image:: https://img.shields.io/pypi/l/zlib-ng.svg
  :target: https://github.com/pycompression/python-zlib-ng/blob/main/LICENSE
  :alt:

.. image:: https://img.shields.io/conda/pn/conda-forge/python-zlib-ng.svg
  :target: https://github.com/conda-forge/python-zlib-ng-feedstock
  :alt:

.. image:: https://github.com/pycompression/python-zlib-ng//actions/workflows/ci.yml/badge.svg
  :target: https://github.com/pycompression/python-zlib-ng/actions
  :alt:

.. image:: https://codecov.io/gh/pycompression/python-zlib-ng/branch/develop/graph/badge.svg
  :target: https://codecov.io/gh/pycompression/python-zlib-ng
  :alt:

.. image:: https://readthedocs.org/projects/python-zlib-ng/badge
   :target: https://python-zlib-ng.readthedocs.io
   :alt:


python-zlib-ng
==============

.. introduction start

Faster zlib and gzip compatible compression and decompression
by providing Python bindings for the zlib-ng library.

This package provides Python bindings for the `zlib-ng
<https://github.com/zlib-ng/zlib-ng>`_ library.

``python-zlib-ng`` provides the bindings by offering three modules:

+ ``zlib_ng``: A drop-in replacement for the zlib module that uses zlib-ng to
  accelerate its performance.

+ ``gzip_ng``: A drop-in replacement for the gzip module that uses ``zlib_ng``
  instead of ``zlib`` to perform its compression and checksum tasks, which
  improves performance.

+ ``gzip_ng_threaded`` offers an ``open`` function which returns buffered read
  or write streams that can be used to read and write large files while
  escaping the GIL using one or multiple threads. This functionality only
  works for streaming, seeking is not supported.

``zlib_ng`` and ``gzip_ng`` are almost fully compatible with ``zlib`` and
``gzip`` from the Python standard library. There are some minor differences
see: differences-with-zlib-and-gzip-modules_.

.. introduction end

Quickstart
----------

.. quickstart start

The python-zlib-ng modules can be imported as follows

.. code-block:: python

    from zlib_ng import zlib_ng
    from zlib_ng import gzip_ng
    from zlib_ng import gzip_ng_threaded

``zlib_ng`` and ``gzip_ng`` are meant to be used as drop in replacements so
their api and functions are the same as the stdlib's modules.

A full API documentation can be found on `our readthedocs page
<https://python-zlib-ng.readthedocs.io>`_.

``python -m zlib_ng.gzip_ng`` implements a fully featured gzip-like command line
application (just like ``python -m gzip``, but better). Full usage documentation can be
found on `our readthedocs page <https://python-zlib-ng.readthedocs.io>`_.


.. quickstart end

Installation
------------
- with pip: ``pip install zlib-ng``
- with conda: ``conda install python-zlib-ng``

Installation is supported on Linux, Windows and MacOS. For more advanced
installation options check the `documentation
<https://python-zlib-ng.readthedocs.io/en/stable/index.html#installation>`_.

python-zlib-ng as a dependency in your project
----------------------------------------------

.. dependency start

zlib-ng supports numerous platforms but not all of these have pre-built wheels
available. To prevent your users from running into issues when installing
your project please list a python-zlib-ng dependency as follows.

``setup.cfg``::

    install_requires =
        zlib-ng; platform.machine == "x86_64" or platform.machine == "AMD64"

``setup.py``::

    extras_require={
        ":platform.machine == 'x86_64' or platform.machine == 'AMD64'": ['zlib-ng']
    },

.. dependency end

.. _differences-with-zlib-and-gzip-modules:

Differences with zlib and gzip modules
--------------------------------------

.. differences start

+ Compression level 1 zlib_ng has a worse compression rate than that in
  zlib. For other compression levels zlib_ng compresses better.
+ ``gzip_ng.open`` returns a class ``GzipNGFile`` instead of ``GzipFile``. Since
  there are differences between the compressed ratios between levels, a
  difference in naming was chosen to reflect this.
  ``gzip_ng.GzipFile`` does exist as an alias of
  ``gzip_ng.GzipNGFile`` for compatibility reasons.

.. differences end

Contributing
------------
.. contributing start

Please make a PR or issue if you feel anything can be improved. Bug reports
are also very welcome. Please report them on the `github issue tracker
<https://github.com/rhpvorderman/python-zlib-ng/issues>`_.

.. contributing end

Acknowledgements
----------------

.. acknowledgements start

This project builds upon the software and experience of many.  Many thanks to:

+ The `zlib-ng contributors
  <https://github.com/zlib-ng/zlib-ng/graphs/contributors>`_ for making the
  zlib-ng library.
+ The `CPython contributors
  <https://github.com/python/cpython/graphs/contributors>`_.
  Python-zlib-ng mimicks ``zlibmodule.c`` and ``gzip.py`` from the standard
  library to make it easier for python users to adopt it.
+ The `github actions team <https://github.com/orgs/actions/people>`_ for
  creating the actions CI service that enables building and testing on all
  three major operating systems.

.. acknowledgements end

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/pycompression/python-zlib-ng",
    "name": "zlib-ng",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "zlib-ng zlib compression deflate gzip",
    "author": "Leiden University Medical Center",
    "author_email": "r.h.p.vorderman@lumc.nl",
    "download_url": null,
    "platform": null,
    "description": ".. image:: https://img.shields.io/pypi/v/zlib-ng.svg\n  :target: https://pypi.org/project/zlib-ng/\n  :alt:\n\n.. image:: https://img.shields.io/conda/v/conda-forge/python-zlib-ng.svg\n  :target: https://github.com/conda-forge/python-zlib-ng-feedstock\n  :alt:\n\n.. image:: https://img.shields.io/pypi/pyversions/zlib-ng.svg\n  :target: https://pypi.org/project/zlib-ng/\n  :alt:\n\n.. image:: https://img.shields.io/pypi/l/zlib-ng.svg\n  :target: https://github.com/pycompression/python-zlib-ng/blob/main/LICENSE\n  :alt:\n\n.. image:: https://img.shields.io/conda/pn/conda-forge/python-zlib-ng.svg\n  :target: https://github.com/conda-forge/python-zlib-ng-feedstock\n  :alt:\n\n.. image:: https://github.com/pycompression/python-zlib-ng//actions/workflows/ci.yml/badge.svg\n  :target: https://github.com/pycompression/python-zlib-ng/actions\n  :alt:\n\n.. image:: https://codecov.io/gh/pycompression/python-zlib-ng/branch/develop/graph/badge.svg\n  :target: https://codecov.io/gh/pycompression/python-zlib-ng\n  :alt:\n\n.. image:: https://readthedocs.org/projects/python-zlib-ng/badge\n   :target: https://python-zlib-ng.readthedocs.io\n   :alt:\n\n\npython-zlib-ng\n==============\n\n.. introduction start\n\nFaster zlib and gzip compatible compression and decompression\nby providing Python bindings for the zlib-ng library.\n\nThis package provides Python bindings for the `zlib-ng\n<https://github.com/zlib-ng/zlib-ng>`_ library.\n\n``python-zlib-ng`` provides the bindings by offering three modules:\n\n+ ``zlib_ng``: A drop-in replacement for the zlib module that uses zlib-ng to\n  accelerate its performance.\n\n+ ``gzip_ng``: A drop-in replacement for the gzip module that uses ``zlib_ng``\n  instead of ``zlib`` to perform its compression and checksum tasks, which\n  improves performance.\n\n+ ``gzip_ng_threaded`` offers an ``open`` function which returns buffered read\n  or write streams that can be used to read and write large files while\n  escaping the GIL using one or multiple threads. This functionality only\n  works for streaming, seeking is not supported.\n\n``zlib_ng`` and ``gzip_ng`` are almost fully compatible with ``zlib`` and\n``gzip`` from the Python standard library. There are some minor differences\nsee: differences-with-zlib-and-gzip-modules_.\n\n.. introduction end\n\nQuickstart\n----------\n\n.. quickstart start\n\nThe python-zlib-ng modules can be imported as follows\n\n.. code-block:: python\n\n    from zlib_ng import zlib_ng\n    from zlib_ng import gzip_ng\n    from zlib_ng import gzip_ng_threaded\n\n``zlib_ng`` and ``gzip_ng`` are meant to be used as drop in replacements so\ntheir api and functions are the same as the stdlib's modules.\n\nA full API documentation can be found on `our readthedocs page\n<https://python-zlib-ng.readthedocs.io>`_.\n\n``python -m zlib_ng.gzip_ng`` implements a fully featured gzip-like command line\napplication (just like ``python -m gzip``, but better). Full usage documentation can be\nfound on `our readthedocs page <https://python-zlib-ng.readthedocs.io>`_.\n\n\n.. quickstart end\n\nInstallation\n------------\n- with pip: ``pip install zlib-ng``\n- with conda: ``conda install python-zlib-ng``\n\nInstallation is supported on Linux, Windows and MacOS. For more advanced\ninstallation options check the `documentation\n<https://python-zlib-ng.readthedocs.io/en/stable/index.html#installation>`_.\n\npython-zlib-ng as a dependency in your project\n----------------------------------------------\n\n.. dependency start\n\nzlib-ng supports numerous platforms but not all of these have pre-built wheels\navailable. To prevent your users from running into issues when installing\nyour project please list a python-zlib-ng dependency as follows.\n\n``setup.cfg``::\n\n    install_requires =\n        zlib-ng; platform.machine == \"x86_64\" or platform.machine == \"AMD64\"\n\n``setup.py``::\n\n    extras_require={\n        \":platform.machine == 'x86_64' or platform.machine == 'AMD64'\": ['zlib-ng']\n    },\n\n.. dependency end\n\n.. _differences-with-zlib-and-gzip-modules:\n\nDifferences with zlib and gzip modules\n--------------------------------------\n\n.. differences start\n\n+ Compression level 1 zlib_ng has a worse compression rate than that in\n  zlib. For other compression levels zlib_ng compresses better.\n+ ``gzip_ng.open`` returns a class ``GzipNGFile`` instead of ``GzipFile``. Since\n  there are differences between the compressed ratios between levels, a\n  difference in naming was chosen to reflect this.\n  ``gzip_ng.GzipFile`` does exist as an alias of\n  ``gzip_ng.GzipNGFile`` for compatibility reasons.\n\n.. differences end\n\nContributing\n------------\n.. contributing start\n\nPlease make a PR or issue if you feel anything can be improved. Bug reports\nare also very welcome. Please report them on the `github issue tracker\n<https://github.com/rhpvorderman/python-zlib-ng/issues>`_.\n\n.. contributing end\n\nAcknowledgements\n----------------\n\n.. acknowledgements start\n\nThis project builds upon the software and experience of many.  Many thanks to:\n\n+ The `zlib-ng contributors\n  <https://github.com/zlib-ng/zlib-ng/graphs/contributors>`_ for making the\n  zlib-ng library.\n+ The `CPython contributors\n  <https://github.com/python/cpython/graphs/contributors>`_.\n  Python-zlib-ng mimicks ``zlibmodule.c`` and ``gzip.py`` from the standard\n  library to make it easier for python users to adopt it.\n+ The `github actions team <https://github.com/orgs/actions/people>`_ for\n  creating the actions CI service that enables building and testing on all\n  three major operating systems.\n\n.. acknowledgements end\n",
    "bugtrack_url": null,
    "license": "PSF-2.0",
    "summary": "Drop-in replacement for zlib and gzip modules using zlib-ng",
    "version": "0.5.1",
    "project_urls": {
        "Homepage": "https://github.com/pycompression/python-zlib-ng"
    },
    "split_keywords": [
        "zlib-ng",
        "zlib",
        "compression",
        "deflate",
        "gzip"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ebb2ea991f6668fff6f704010ac9450a94a40d10def8686fc46392e29408ee38",
                "md5": "d1b29b2d47f9382737c9c8df160a8afc",
                "sha256": "1be5a5513876cd0a071bbb0fc333eb00bc9c25399f2b863e329dfe6ac4cf6455"
            },
            "downloads": -1,
            "filename": "zlib_ng-0.5.1-cp310-cp310-macosx_11_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "d1b29b2d47f9382737c9c8df160a8afc",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.8",
            "size": 91229,
            "upload_time": "2024-09-25T08:05:16",
            "upload_time_iso_8601": "2024-09-25T08:05:16.487208Z",
            "url": "https://files.pythonhosted.org/packages/eb/b2/ea991f6668fff6f704010ac9450a94a40d10def8686fc46392e29408ee38/zlib_ng-0.5.1-cp310-cp310-macosx_11_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f817a1b64f8d9bbbc0af6054fdf70c8efbce835acc8a280beb9d1083fff4dfd7",
                "md5": "8f5b87f22d9b9d64c6aa2ce4a3491ee5",
                "sha256": "2b8d32a1c296f72e455784ed594c67c9a55e90bd036b4e2ef6621263ec37a481"
            },
            "downloads": -1,
            "filename": "zlib_ng-0.5.1-cp311-cp311-macosx_11_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "8f5b87f22d9b9d64c6aa2ce4a3491ee5",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.8",
            "size": 91232,
            "upload_time": "2024-09-25T08:05:18",
            "upload_time_iso_8601": "2024-09-25T08:05:18.480514Z",
            "url": "https://files.pythonhosted.org/packages/f8/17/a1b64f8d9bbbc0af6054fdf70c8efbce835acc8a280beb9d1083fff4dfd7/zlib_ng-0.5.1-cp311-cp311-macosx_11_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2b8d6eeab2683050d2e3c978a519ce318d5dd852b8e4a73f476182f8cd67e58d",
                "md5": "5def720d04667e4fc74f3296ff50abf0",
                "sha256": "c347663989f3d3d7bb3a635da893c8a90b20b1f3edaaedb037638de3a50c8ab3"
            },
            "downloads": -1,
            "filename": "zlib_ng-0.5.1-cp312-cp312-macosx_11_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "5def720d04667e4fc74f3296ff50abf0",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.8",
            "size": 91406,
            "upload_time": "2024-09-25T08:05:20",
            "upload_time_iso_8601": "2024-09-25T08:05:20.194950Z",
            "url": "https://files.pythonhosted.org/packages/2b/8d/6eeab2683050d2e3c978a519ce318d5dd852b8e4a73f476182f8cd67e58d/zlib_ng-0.5.1-cp312-cp312-macosx_11_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3db18ac15b749af15c95d362da73d18640ec014a2c5ba7005a2bafab7d7d1c7a",
                "md5": "6210ba1c21a907409323d9a4b969f2be",
                "sha256": "9827b85093066afb1b3f8c3a662e2f6953bd1c07e7ae70a558ea6b8adcc898b9"
            },
            "downloads": -1,
            "filename": "zlib_ng-0.5.1-cp313-cp313-macosx_11_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "6210ba1c21a907409323d9a4b969f2be",
            "packagetype": "bdist_wheel",
            "python_version": "cp313",
            "requires_python": ">=3.8",
            "size": 91395,
            "upload_time": "2024-09-25T08:05:22",
            "upload_time_iso_8601": "2024-09-25T08:05:22.074368Z",
            "url": "https://files.pythonhosted.org/packages/3d/b1/8ac15b749af15c95d362da73d18640ec014a2c5ba7005a2bafab7d7d1c7a/zlib_ng-0.5.1-cp313-cp313-macosx_11_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "27e2ff1c881f6a3f12d0a33117112ee76377649cb07e974a3d6ee9b670a11a1e",
                "md5": "ece37ca7c37a94ef3035b91647deb43d",
                "sha256": "808d749ad0b2c6942755760c1f17655c8106f78f6d9e4729eb5486361715fca8"
            },
            "downloads": -1,
            "filename": "zlib_ng-0.5.1-cp39-cp39-macosx_11_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "ece37ca7c37a94ef3035b91647deb43d",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": ">=3.8",
            "size": 91242,
            "upload_time": "2024-09-25T08:05:23",
            "upload_time_iso_8601": "2024-09-25T08:05:23.440012Z",
            "url": "https://files.pythonhosted.org/packages/27/e2/ff1c881f6a3f12d0a33117112ee76377649cb07e974a3d6ee9b670a11a1e/zlib_ng-0.5.1-cp39-cp39-macosx_11_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6f729daa0d0b85917b758250f43fb542680d5b9196d148b122fd70fd08026eb6",
                "md5": "fa2fa283cc73ae5fe71d3c96c67a3a99",
                "sha256": "4333a177e3818c2eb36aa62ca0c7a34010e2f7fbd28bb2f2cee68ce4f2cfcb2e"
            },
            "downloads": -1,
            "filename": "zlib_ng-0.5.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "fa2fa283cc73ae5fe71d3c96c67a3a99",
            "packagetype": "bdist_wheel",
            "python_version": "pp310",
            "requires_python": ">=3.8",
            "size": 91067,
            "upload_time": "2024-09-25T08:05:24",
            "upload_time_iso_8601": "2024-09-25T08:05:24.664184Z",
            "url": "https://files.pythonhosted.org/packages/6f/72/9daa0d0b85917b758250f43fb542680d5b9196d148b122fd70fd08026eb6/zlib_ng-0.5.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "68ddc2b8c5595cf80b502445059a66cb2e587b8cf753d4d1bc11e2f38055d2a3",
                "md5": "632c0d7203cde352024c5e2c7304afd1",
                "sha256": "91b85730e303ef239c3c361cc02023c61eb2739126be1f0e36f5a1f311d2d4f4"
            },
            "downloads": -1,
            "filename": "zlib_ng-0.5.1-pp38-pypy38_pp73-macosx_11_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "632c0d7203cde352024c5e2c7304afd1",
            "packagetype": "bdist_wheel",
            "python_version": "pp38",
            "requires_python": ">=3.8",
            "size": 91079,
            "upload_time": "2024-09-25T08:05:26",
            "upload_time_iso_8601": "2024-09-25T08:05:26.410528Z",
            "url": "https://files.pythonhosted.org/packages/68/dd/c2b8c5595cf80b502445059a66cb2e587b8cf753d4d1bc11e2f38055d2a3/zlib_ng-0.5.1-pp38-pypy38_pp73-macosx_11_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "64c60d9e3c3688e7615a64641ee8e845a6b444e54045a13a59d5cb8ad6d24176",
                "md5": "69460651e53aaa3fe957f3023f543cf2",
                "sha256": "cfa63c08af2eef138e6c1403ad9302ff5b3fd30c4b116534bc60c3d6b79bf76a"
            },
            "downloads": -1,
            "filename": "zlib_ng-0.5.1-pp39-pypy39_pp73-macosx_11_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "69460651e53aaa3fe957f3023f543cf2",
            "packagetype": "bdist_wheel",
            "python_version": "pp39",
            "requires_python": ">=3.8",
            "size": 91086,
            "upload_time": "2024-09-25T08:05:28",
            "upload_time_iso_8601": "2024-09-25T08:05:28.283476Z",
            "url": "https://files.pythonhosted.org/packages/64/c6/0d9e3c3688e7615a64641ee8e845a6b444e54045a13a59d5cb8ad6d24176/zlib_ng-0.5.1-pp39-pypy39_pp73-macosx_11_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-25 08:05:16",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "pycompression",
    "github_project": "python-zlib-ng",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "zlib-ng"
}
        
Elapsed time: 0.90186s