{ "info": { "author": "Daniel Pope", "author_email": "mauve@mauveweb.co.uk", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: System :: Archiving :: Compression" ], "description": "lzf\n===\n\n.. image:: https://travis-ci.org/lordmauve/lzf.svg?branch=master\n :target: https://travis-ci.org/lordmauve/lzf\n\n\n``lzf`` allows reading and writing files compressed with the LZF_ compression\nformat.\n\n.. _LZF: http://oldhome.schmorp.de/marc/liblzf.html\n\nTo crib some of the features listed for ``LibLZF``:\n\n* *Very* fast compression speeds.\n* Mediocre compression ratios - you can usually expect about 40-50% compression\n for typical binary data Easy to use (just two functions, no state attached).\n* Freely usable (BSD-type-license)\n\n\nAPI\n---\n\nThis package provides reading and writing LZF data as Python file like objects.\n\n``lzf.open(file, mode='r', encoding=None, errors=None)``\n\n Open a LZF stream for reading or writing.\n\n ``file`` may be a path to an on-disk file, or a file-like object open for\n reading or writing (whatever you pass to ``mode``).\n\n ``mode`` must be ``r`` or ``w`` to indicate reading or writing,\n optionally with ``b`` or ``t`` to indicate binary or text-mode IO. If the\n mode is text (the default), then ``U`` is also accepted to turn on\n universal newline mode.\n\n ``encoding`` and ``errors`` are as for the built-in ``open()``\n function.\n\n Note that ``lzf.open()`` takes the Python 3 model for text IO, even on\n Python 2. Unless ``mode`` contains ``'b'``, then the returned file-like\n object will read or write Unicode strings.\n\n\nExamples\n--------\n\nTo open an on-disk LZF-compressed text file and print it linewise::\n\n import lzf\n\n with lzf.open('/path/to/file.txt.lzf') as f:\n for line in f:\n print(line)\n\nTo compress some binary data with LZF::\n\n import lzf\n\n with lzf.open('/path/to/file.lzf', 'wb') as f:\n f.write(b'hello world')\n\nTo read LZF compressed CBOR_ structures from a URL::\n\n import lzf\n import cbor2\n from urllib.request import urlopen # Use urllib2 in Python 2\n\n SOME_URL = 'http://example.com/data.cbor.lzf'\n\n with lzf.open(urlopen(SOME_URL), 'rb') as f:\n print(cbor2.load(f))\n\n\n(You'll need cbor2_ installed if you want to try this.)\n\n.. _cbor2: https://pypi.python.org/pypi/cbor2\n\n.. _CBOR: http://cbor.io/\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/lordmauve/lzf", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "lzf", "package_url": "https://pypi.org/project/lzf/", "platform": "", "project_url": "https://pypi.org/project/lzf/", "project_urls": { "Homepage": "https://github.com/lordmauve/lzf" }, "release_url": "https://pypi.org/project/lzf/0.1/", "requires_dist": null, "requires_python": "", "summary": "CFFI-based Python binding for LZF stream compression", "version": "0.1" }, "last_serial": 3045826, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "b9094aa8ea99ab95644dc82525ffb5e8", "sha256": "2163a5172f7328baa4a5a0a351617a4d92a5d264975e67f581ed24a9dcf8893b" }, "downloads": -1, "filename": "lzf-0.1.tar.gz", "has_sig": false, "md5_digest": "b9094aa8ea99ab95644dc82525ffb5e8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 28449, "upload_time": "2017-07-24T20:38:48", "url": "https://files.pythonhosted.org/packages/ef/f7/70aa6aacd6bc865e74dae319bb262078d59f6cf90584da2bbe7307b52565/lzf-0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b9094aa8ea99ab95644dc82525ffb5e8", "sha256": "2163a5172f7328baa4a5a0a351617a4d92a5d264975e67f581ed24a9dcf8893b" }, "downloads": -1, "filename": "lzf-0.1.tar.gz", "has_sig": false, "md5_digest": "b9094aa8ea99ab95644dc82525ffb5e8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 28449, "upload_time": "2017-07-24T20:38:48", "url": "https://files.pythonhosted.org/packages/ef/f7/70aa6aacd6bc865e74dae319bb262078d59f6cf90584da2bbe7307b52565/lzf-0.1.tar.gz" } ] }