{ "info": { "author": "Cameron Simpson", "author_email": "cs@cskk.id.au", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "Facilities to do with buffers, particularly CornuCopyBuffer,\nan automatically refilling buffer to support parsing of data streams.\n\n## Function `chunky(bfr_func)`\n\nDecorator for a function accepting a leading CornuCopyBuffer\nparameter.\nReturns a function accepting a leading data chunks parameter\n(bytes instances) and optional `offset` and 'copy_offsets`\nkeywords parameters.\n\nExample::\n\n @chunky\n def func(bfr, ...):\n\n## Class `CopyingIterator`\n\nWrapper for an iterator that copies every item retrieved to a callable.\n\n## Class `CornuCopyBuffer`\n\nAn automatically refilling buffer intended to support parsing\nof data streams.\n\nAttributes:\n* `buf`: a buffer of unparsed data from the input, available\n for direct inspection by parsers\n* `offset`: the logical offset of the buffer; this excludes\n unconsumed input data and `.buf`\n\nThe primary methods supporting parsing of data streams are\nextend() and take(). Calling `.extend(min_size)` arranges\nthat `.buf` contains at least `min_size` bytes. Calling `.take(size)`\nfetches exactly `size` bytes from `.buf` and the input source if\nnecessary and returns them, adjusting `.buf`.\n\nlen(CornuCopyBuffer) returns the length of `.buf`.\n\nbool(CornuCopyBuffer) tests whether len() > 0.\n\nIndexing a CornuCopyBuffer accesses `.buf`.\n\nA CornuCopyBuffer is also iterable, yielding data in whatever\nsizes come from its `input_data` source, preceeded by the\ncurrent `.buf` if not empty.\n\nA CornuCopyBuffer also supports the file methods `.read`,\n`.tell` and `.seek` supporting drop in use of the buffer in\nmany file contexts. Backward seeks are not supported. `.seek`\nwill take advantage of the `input_data`'s .seek method if it\nhas one, otherwise it will use reads.\n\n## Class `FDIterator`\n\nMRO: `_Iterator` \nAn iterator over the data of a file descriptor.\n\n*Note*: the iterator works with an os.dup() of the file\ndescriptor so that it can close it with impunity; this requires\nthe caller to close their descriptor.\n\n## Class `FileIterator`\n\nMRO: `_Iterator`, `SeekableIteratorMixin` \nAn iterator over the data of a file object.\n\n*Note*: the iterator closes the file on __del__ or if its\n.close method is called.\n\n## Class `SeekableFDIterator`\n\nMRO: `FDIterator`, `_Iterator`, `SeekableIteratorMixin` \nAn iterator over the data of a seekable file descriptor.\n\n*Note*: the iterator works with an os.dup() of the file\ndescriptor so that it can close it with impunity; this requires\nthe caller to close their descriptor.\n\n## Class `SeekableFileIterator`\n\nMRO: `FileIterator`, `_Iterator`, `SeekableIteratorMixin` \nAn iterator over the data of a seekable file object.\n\n*Note*: the iterator closes the file on __del__ or if its\n.close method is called.\n\n## Class `SeekableIteratorMixin`\n\nMixin supplying a logical with a `seek` method.\n\n## Class `SeekableMMapIterator`\n\nMRO: `_Iterator`, `SeekableIteratorMixin` \nAn iterator over the data of a mappable file descriptor.\n\n*Note*: the iterator works with an mmap of an os.dup() of the\nfile descriptor so that it can close it with impunity; this\nrequires the caller to close their descriptor.", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://bitbucket.org/cameron_simpson/css/commits/all", "keywords": "python3", "license": "", "maintainer": "", "maintainer_email": "", "name": "cs.buffer", "package_url": "https://pypi.org/project/cs.buffer/", "platform": "", "project_url": "https://pypi.org/project/cs.buffer/", "project_urls": { "Homepage": "https://bitbucket.org/cameron_simpson/css/commits/all" }, "release_url": "https://pypi.org/project/cs.buffer/20181231/", "requires_dist": null, "requires_python": "", "summary": "Facilities to do with buffers, particularly CornuCopyBuffer, an automatically refilling buffer to support parsing of data streams.", "version": "20181231" }, "last_serial": 4647895, "releases": { "20180726": [ { "comment_text": "", "digests": { "md5": "37c65e45ee38e73bd95607b4ff552f39", "sha256": "54d39dbc51c667dd553496a4632a7318bdac7d659dc8ca156c8f659b1b12145b" }, "downloads": -1, "filename": "cs.buffer-20180726.tar.gz", "has_sig": false, "md5_digest": "37c65e45ee38e73bd95607b4ff552f39", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7216, "upload_time": "2018-07-26T02:11:57", "url": "https://files.pythonhosted.org/packages/f0/fd/0a4d2437b33af366e76f01652cc42900be884c18eb4ec3f6ff939e00ed30/cs.buffer-20180726.tar.gz" } ], "20180726.1": [ { "comment_text": "", "digests": { "md5": "56e492e00b3a0182986d7b37e5e6cdad", "sha256": "459d0dbd584751ce3c4ec501b53e7001f55f8d0f27202be2e00a50848ee26d98" }, "downloads": -1, "filename": "cs.buffer-20180726.1.tar.gz", "has_sig": false, "md5_digest": "56e492e00b3a0182986d7b37e5e6cdad", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7615, "upload_time": "2018-07-26T02:18:15", "url": "https://files.pythonhosted.org/packages/f7/ba/ca82f1ba1f6d0ecae52fbb202f4afcd6393df357a7277df939771f0cab4b/cs.buffer-20180726.1.tar.gz" } ], "20180805": [ { "comment_text": "", "digests": { "md5": "a576c2ba32084764549157f6f6ba882b", "sha256": "77346047c0a0cdabe4569a7baa43b2fded7c1fef3a541d7e9efcdd07fd0f242d" }, "downloads": -1, "filename": "cs.buffer-20180805.tar.gz", "has_sig": false, "md5_digest": "a576c2ba32084764549157f6f6ba882b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7606, "upload_time": "2018-08-04T23:37:15", "url": "https://files.pythonhosted.org/packages/40/d5/ceffdbe3bdb6ea5ddafcc6820a82e595864c0556dd62bb6b9d90b0e73a06/cs.buffer-20180805.tar.gz" } ], "20180810": [ { "comment_text": "", "digests": { "md5": "36d4a8c1843cc92a5d0639bc0e80af63", "sha256": "92e587de7472c4b2f757b4f953332f29ffafcbc29416ce5089ff7a4215b19ba5" }, "downloads": -1, "filename": "cs.buffer-20180810.tar.gz", "has_sig": false, "md5_digest": "36d4a8c1843cc92a5d0639bc0e80af63", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10410, "upload_time": "2018-08-09T23:13:41", "url": "https://files.pythonhosted.org/packages/51/db/f9974703a0a5db04a20dadcc3d9ce64b0520d647c50784947a6eeb874bbf/cs.buffer-20180810.tar.gz" } ], "20180823": [ { "comment_text": "", "digests": { "md5": "229b1e721d86fac63da6c42c5a61d2b5", "sha256": "cbfafc0257ea9eaaf91744a9e022f46e3c11782932ff5c12db13613282c9fe67" }, "downloads": -1, "filename": "cs.buffer-20180823.tar.gz", "has_sig": false, "md5_digest": "229b1e721d86fac63da6c42c5a61d2b5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11120, "upload_time": "2018-08-23T02:16:14", "url": "https://files.pythonhosted.org/packages/1b/0f/65bc5f8c4bf7e5149f8765f50998b700e652cc8918b41efe0b2bc49f9bc4/cs.buffer-20180823.tar.gz" } ], "20181108": [ { "comment_text": "", "digests": { "md5": "e3aed9e08aecbdd5f49d04e86a6c5859", "sha256": "f46874de49f45cd2e73577972bb53a656f2f251b71a5f4808e0227cc10b417d8" }, "downloads": -1, "filename": "cs.buffer-20181108.tar.gz", "has_sig": false, "md5_digest": "e3aed9e08aecbdd5f49d04e86a6c5859", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11132, "upload_time": "2018-11-08T03:51:34", "url": "https://files.pythonhosted.org/packages/9e/e3/fd7631bc792752b9d6f8584add81bf90db9ca721e16125a169748bfcc224/cs.buffer-20181108.tar.gz" } ], "20181231": [ { "comment_text": "", "digests": { "md5": "3d667843ecee2bb392132728ed896eec", "sha256": "2eda809e7bc22f8efe8b7385a276ed0fb5c524c4111141626eba491ed70ab123" }, "downloads": -1, "filename": "cs.buffer-20181231.tar.gz", "has_sig": false, "md5_digest": "3d667843ecee2bb392132728ed896eec", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11133, "upload_time": "2018-12-31T10:11:28", "url": "https://files.pythonhosted.org/packages/ae/83/5fd1a62471838cdc401bd9bc6c88e00009b8e49cbb640eba94197c6ebd35/cs.buffer-20181231.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "3d667843ecee2bb392132728ed896eec", "sha256": "2eda809e7bc22f8efe8b7385a276ed0fb5c524c4111141626eba491ed70ab123" }, "downloads": -1, "filename": "cs.buffer-20181231.tar.gz", "has_sig": false, "md5_digest": "3d667843ecee2bb392132728ed896eec", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11133, "upload_time": "2018-12-31T10:11:28", "url": "https://files.pythonhosted.org/packages/ae/83/5fd1a62471838cdc401bd9bc6c88e00009b8e49cbb640eba94197c6ebd35/cs.buffer-20181231.tar.gz" } ] }