{ "info": { "author": "Luca Cappelletti", "author_email": "cappelletti.luca94@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3" ], "description": "prefix_codes\n=========================================================================================\n|travis| |sonar_quality| |sonar_maintainability| |codacy| |code_climate_maintainability| |pip| |downloads|\n\nPython package implementing a number of prefix codes as strings for educational purposes alongside some utilities.\n\nHow do I install this package?\n----------------------------------------------\nAs usual, just download it using pip:\n\n.. code:: shell\n\n pip install prefix_codes\n\nTests Coverage\n----------------------------------------------\nSince some software handling coverages sometime get slightly different results, here's three of them:\n\n|coveralls| |sonar_coverage| |code_climate_coverage|\n\nAvailable codes\n----------------------------------------------\nThe following codes are available as submodules (they are also installable by themselves) or imported.\n\nIt should be noted that some of the following codes are not prefix codes, but are still important codes.\n\n- `Unary coding `_.\n- `Reduced binary encoding `_.\n- `Minimal binary encoding `_.\n- `Gamma coding `_.\n- `Delta coding `_.\n- `Omega coding `_.\n- `Interpolative coding `_.\n- `Nibble e Byte coding `_.\n- `Truncated binary encoding `_.\n- `Golomb coding `_.\n- `Levenshtein coding `_.\n\nUsage examples\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nThe following codes are available and readily importable into your project:\n\n.. code:: python\n\n from prefix_codes import unary, inverted_unary\n from prefix_codes import gamma_coding\n from prefix_codes import delta_coding\n from prefix_codes import omega_coding, decode_omega_coding\n from prefix_codes import levenshtein_coding, decode_levenshtein_coding\n from prefix_codes import truncated_binary_encoding\n from prefix_codes import reduced_binary_coding\n from prefix_codes import minimal_binary_coding\n from prefix_codes import interpolative_coding\n from prefix_codes import nibble_coding, byte_coding\n from prefix_codes import golomb_coding, optimal_golomb_coding, bernoulli_golomb_coding\n\n\nAvailable utilities\n----------------------------------------------\nTwo utilities are available, one to determine if a given code is a prefix code and a second one, based on the `Kraft-McMillan inequality `_, to determine if a given code is complete.\n\nIt should be noted that the second utility fails when the code's words are quite long for float errors.\n\nUsage examples\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n.. code:: python\n\n from prefix_codes import is_prefix_code, is_complete_prefix_code\n from prefix_codes import unary, interpolative_coding\n\n numbers = list(range(100))\n unary_code = unary(numbers)\n interpolative_code = interpolative_coding(numbers, 0, 100)\n is_prefix_code(unary_code) # True\n is_prefix_code(interpolative_code) # False\n is_complete_prefix_code(unary_code) # True\n is_complete_prefix_code(interpolative_code) # False\n\n\nElias-Fano semi-succint data structure\n----------------------------------------------\nAn educational version of `Elias-Fano semi-succint data structure `_ implemented using the codes above is also available.\n\n\n.. |travis| image:: https://travis-ci.org/LucaCappelletti94/prefix_codes.png\n :target: https://travis-ci.org/LucaCappelletti94/prefix_codes\n :alt: Travis CI build\n\n.. |sonar_quality| image:: https://sonarcloud.io/api/project_badges/measure?project=LucaCappelletti94_prefix_codes&metric=alert_status\n :target: https://sonarcloud.io/dashboard/index/LucaCappelletti94_prefix_codes\n :alt: SonarCloud Quality\n\n.. |sonar_maintainability| image:: https://sonarcloud.io/api/project_badges/measure?project=LucaCappelletti94_prefix_codes&metric=sqale_rating\n :target: https://sonarcloud.io/dashboard/index/LucaCappelletti94_prefix_codes\n :alt: SonarCloud Maintainability\n\n.. |sonar_coverage| image:: https://sonarcloud.io/api/project_badges/measure?project=LucaCappelletti94_prefix_codes&metric=coverage\n :target: https://sonarcloud.io/dashboard/index/LucaCappelletti94_prefix_codes\n :alt: SonarCloud Coverage\n\n.. |coveralls| image:: https://coveralls.io/repos/github/LucaCappelletti94/prefix_codes/badge.svg?branch=master\n :target: https://coveralls.io/github/LucaCappelletti94/prefix_codes?branch=master\n :alt: Coveralls Coverage\n\n.. |pip| image:: https://badge.fury.io/py/prefix-codes.svg\n :target: https://badge.fury.io/py/prefix-codes\n :alt: Pypi project\n\n.. |downloads| image:: https://pepy.tech/badge/prefix-codes\n :target: https://pepy.tech/badge/prefix-codes\n :alt: Pypi total project downloads \n\n.. |codacy| image:: https://api.codacy.com/project/badge/Grade/9d55d604f31e4f50b5b79b6c96b66541\n :target: https://www.codacy.com/manual/LucaCappelletti94/prefix_codes?utm_source=github.com&utm_medium=referral&utm_content=LucaCappelletti94/prefix_codes&utm_campaign=Badge_Grade\n :alt: Codacy Maintainability\n\n.. |code_climate_maintainability| image:: https://api.codeclimate.com/v1/badges/e53f3df9110281278219/maintainability\n :target: https://codeclimate.com/github/LucaCappelletti94/prefix_codes/maintainability\n :alt: Maintainability\n\n.. |code_climate_coverage| image:: https://api.codeclimate.com/v1/badges/e53f3df9110281278219/test_coverage\n :target: https://codeclimate.com/github/LucaCappelletti94/prefix_codes/test_coverage\n :alt: Code Climate Coverate", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/LucaCappelletti94/prefix_codes", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "prefix-codes", "package_url": "https://pypi.org/project/prefix-codes/", "platform": "", "project_url": "https://pypi.org/project/prefix-codes/", "project_urls": { "Homepage": "https://github.com/LucaCappelletti94/prefix_codes" }, "release_url": "https://pypi.org/project/prefix-codes/1.0.0/", "requires_dist": null, "requires_python": "", "summary": "Python package implementing a number of prefix codes alongside their utilities.", "version": "1.0.0" }, "last_serial": 5810039, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "d6abad145bf293b7df8bb37286aca133", "sha256": "1269da39098e15a1467fd52f8852c16c9070ce9538085cd41b861187577de573" }, "downloads": -1, "filename": "prefix_codes-1.0.0.tar.gz", "has_sig": false, "md5_digest": "d6abad145bf293b7df8bb37286aca133", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4067, "upload_time": "2019-09-10T16:42:30", "url": "https://files.pythonhosted.org/packages/9c/3f/e9fff8ea092bed24bf8e7a034481c050af34f95190613c2900fb00e72fa7/prefix_codes-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d6abad145bf293b7df8bb37286aca133", "sha256": "1269da39098e15a1467fd52f8852c16c9070ce9538085cd41b861187577de573" }, "downloads": -1, "filename": "prefix_codes-1.0.0.tar.gz", "has_sig": false, "md5_digest": "d6abad145bf293b7df8bb37286aca133", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4067, "upload_time": "2019-09-10T16:42:30", "url": "https://files.pythonhosted.org/packages/9c/3f/e9fff8ea092bed24bf8e7a034481c050af34f95190613c2900fb00e72fa7/prefix_codes-1.0.0.tar.gz" } ] }