{ "info": { "author": "Johnson Earls", "author_email": "darkfoxprime@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: ISC License (ISCL)", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "An IFF chunk, as defined in the\n`EA IFF 85 `_\nstandard, consists of a 4-byte ID field, a 4-byte length field,\nand the data content of the chunk, and optionally followed by a\nsingle padding ``null`` byte if required to make the total number\nof bytes even.\n\n+----------+-------------+\n| Chunk ID | 4 bytes |\n+----------+-------------+\n| Length | 4 bytes |\n+----------+-------------+\n| Data | n bytes |\n+----------+-------------+\n| Padding | 0 or 1 byte |\n+----------+-------------+\n\n* The Chunk ID is a 4-character string that identifies the type\n of chunk.\n* The Length is a 4-byte integer (generally in big-endian format)\n indicating how long the data field is.\n\nThe Chunk class allows for either *reading* a chunk from a file-like\nobject or *creating* a chunk and writing it into a file-like object,\nbut not both.\n\nFor reading, the Chunk class reads a single chunk from the file-like\nobject, and is in turn a read-only file-like object for reading the\ncontents of the chunk.\n\nChunk tries to determine if the underlying file-like object is seekable\nby via the ``tell`` operation; if that does not raise an exception,\nthen the file-like object presented by Chunk is itself seekable.\n\nWhen the Chunk is closed, the underlying file-like object is positioned\nto read immediately following the Chunk (and after the padding byte,\nif any).\n\nFor writing, the Chunk class presents a *write-only* file-like object\nfor creating the contents of the chunk, as well as the ``setname``\nmethod for assigning the Chunk ID.\n\nFor writable chunks whose underlying file-like object is not seekable,\nan in-memory file object is created to hold the chunk's data; only\nwhen the chunk is closed is the in-memory file object is flushed to\nthe underlying file-like object.\n\nIFF files can consist of multiple top-level chunks; \"container\"\nchunk types (``FORM``, ``CAT ``, and ``LIST``) contain other chunks.\nThe Chunk class is designed to be instantiated multiple times, one\nafter the other, for either reading or writing multiple chunks from\nor to a file, or from or to the content of a \"container\" chunk.\n\nThe ``parse_chunk`` and ``parse_iff_file`` helper methods assist in\nreading IFF files by automating the parsing of container chunks.\n``parse_iff_file`` returns a list of chunk tuples consisting of the\nchunk name and chunk content; for container chunks, the chunk\ncontent is itself a list of chunk tuples.\n\n--------\n\nTo Do\n=====\n\n* Rewrite from scratch to remove original Python code, if possible\n* Modify to work with both Python 2 and Python 3, if possible\n\n--------\n\nLicense\n=======\n\nOriginal code base copied from Python 2.7 library, then modified\nto support write functionality.\n\nOriginal ``chunk.py`` is Copyright (c) 2001, 2002, 2003, 2004,\n2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015,\n2016, 2017 Python Software Foundation; All Rights Reserved; licensed\nunder the Python Software Foundation License Version 2\n\n\nDerived portions are Copyright (c) 2017 Johnson Earls; All Rights\nReserved; licensed as follows:\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted, provided that the above\ncopyright notice and this permission notice appear in all copies.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\nWITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\nMERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\nANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\nWHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\nACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\nOR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/darkfoxprime/python-chunk2", "keywords": "IFF,chunk,read,write", "license": "ISC", "maintainer": "", "maintainer_email": "", "name": "chunk2", "package_url": "https://pypi.org/project/chunk2/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/chunk2/", "project_urls": { "Homepage": "https://github.com/darkfoxprime/python-chunk2" }, "release_url": "https://pypi.org/project/chunk2/0.1.0/", "requires_dist": null, "requires_python": "", "summary": "A replacement Chunk class that allows both reading and writing IFF chunks.", "version": "0.1.0" }, "last_serial": 2875481, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "91e5e7b5c21bd118e3220d8b804c36ac", "sha256": "8b7723a74b5c45d73a30658dca65d80d9c31ff90f93e43783ae2fc0ee8ab3a45" }, "downloads": -1, "filename": "chunk2-0.1.0.zip", "has_sig": true, "md5_digest": "91e5e7b5c21bd118e3220d8b804c36ac", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12470, "upload_time": "2017-05-15T13:53:21", "url": "https://files.pythonhosted.org/packages/0c/76/a33a4186763ec97095015688302162f4f961fecad0542f0beea346921874/chunk2-0.1.0.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "91e5e7b5c21bd118e3220d8b804c36ac", "sha256": "8b7723a74b5c45d73a30658dca65d80d9c31ff90f93e43783ae2fc0ee8ab3a45" }, "downloads": -1, "filename": "chunk2-0.1.0.zip", "has_sig": true, "md5_digest": "91e5e7b5c21bd118e3220d8b804c36ac", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12470, "upload_time": "2017-05-15T13:53:21", "url": "https://files.pythonhosted.org/packages/0c/76/a33a4186763ec97095015688302162f4f961fecad0542f0beea346921874/chunk2-0.1.0.zip" } ] }