{ "info": { "author": "Behdad Esfahbod", "author_email": "behdad@behdad.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "# packTab\n\nI first wrote something like this back in 2001 when I needed it in FriBidi:\n\n https://github.com/fribidi/fribidi/blob/master/gen.tab/packtab.c\n\nIn 2019 I wanted to use that to produce more compact Unicode data tables\nfor HarfBuzz, but for convenience I wanted to use it from Python. While\nI considered wrapping the C code in a module, it occurred to me that I\ncan rewrite it in pure Python in a much cleaner way. That code remains\na stain on my resume in terms of readability (or lack thereof!). :D\n\nThis Python version builds on the same ideas, but is different from the\nC version in two major ways:\n\n1. Whereas the C version uses backtracking to find best split opportunities,\n I found that the same can be achieved using dynamic-programming. So the\n Python version implements the DP approach, which is much faster.\n\n2. The C version does not try packing multiple items into a single byte.\n The Python version does. Ie. if items fit, they might get packed into\n 1, 2, or 4 bits per item.\n\nThere's also a bunch of other optimizations, which make (eventually, when\ncomplete) the Python version more generic and usable for a wider variety\nof data tables.\n\n## TODO:\n\n- Reduce code duplication between Inner/Outer genCode().\n- Handle empty data array.\n- Bake in width multiplier into array data if doing so doesn't enlarge\n data type. Again, that would save ops.\n- If an array is not larger than 64 bits, inline it in code directly\n as one integer.\n- Currently we only cull array of defaults at the end. Do it at\n beginning as well, and adjust split code to find optimum shift.\n- Byte reuse! Much bigger work item.\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/harfbuzz/packtab", "keywords": "", "license": "Apache Software License 2.0", "maintainer": "", "maintainer_email": "", "name": "packtab", "package_url": "https://pypi.org/project/packtab/", "platform": "any", "project_url": "https://pypi.org/project/packtab/", "project_urls": { "Homepage": "https://github.com/harfbuzz/packtab" }, "release_url": "https://pypi.org/project/packtab/0.1.0/", "requires_dist": null, "requires_python": ">=3.5", "summary": "Unicode (and other integer) table packer", "version": "0.1.0" }, "last_serial": 5293744, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "647ccb190f458e74a597831087ed0816", "sha256": "6238e066bbb94f2b6564d337429a4d75c382b8c5b2023ab87943c2f121188bfd" }, "downloads": -1, "filename": "packtab-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "647ccb190f458e74a597831087ed0816", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 13991, "upload_time": "2019-05-20T18:43:30", "url": "https://files.pythonhosted.org/packages/60/46/829f657fa052185c56909f6beb9a8eba95514d91ff6d10bfec0bada565f0/packtab-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "618a59ebdd6f0289c91a0a5c60d9416b", "sha256": "bdbd16243d540c20d421cca5dd82ec1499b9befe02f1e100b054ab6909549739" }, "downloads": -1, "filename": "packtab-0.1.0.tar.gz", "has_sig": false, "md5_digest": "618a59ebdd6f0289c91a0a5c60d9416b", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 11879, "upload_time": "2019-05-20T18:43:32", "url": "https://files.pythonhosted.org/packages/f8/1a/f607bead29fd61a6e193b64b0917716ea42d02b3cd078ef73f0a3985d199/packtab-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "647ccb190f458e74a597831087ed0816", "sha256": "6238e066bbb94f2b6564d337429a4d75c382b8c5b2023ab87943c2f121188bfd" }, "downloads": -1, "filename": "packtab-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "647ccb190f458e74a597831087ed0816", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 13991, "upload_time": "2019-05-20T18:43:30", "url": "https://files.pythonhosted.org/packages/60/46/829f657fa052185c56909f6beb9a8eba95514d91ff6d10bfec0bada565f0/packtab-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "618a59ebdd6f0289c91a0a5c60d9416b", "sha256": "bdbd16243d540c20d421cca5dd82ec1499b9befe02f1e100b054ab6909549739" }, "downloads": -1, "filename": "packtab-0.1.0.tar.gz", "has_sig": false, "md5_digest": "618a59ebdd6f0289c91a0a5c60d9416b", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 11879, "upload_time": "2019-05-20T18:43:32", "url": "https://files.pythonhosted.org/packages/f8/1a/f607bead29fd61a6e193b64b0917716ea42d02b3cd078ef73f0a3985d199/packtab-0.1.0.tar.gz" } ] }