{ "info": { "author": "Daiju Nakayama", "author_email": "42.daiju@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 3", "Topic :: Utilities" ], "description": "# bitio\n\nInput/output utirites of bit basis file\n\n## How to use\n\n```py\nfrom bitio import bit_open\n\nf = bit_open(file_name, \"r\")\nx = f.read() # return 1 or 0\nx = f.read_bits(count) # return int\n\nf = bit_open(file_name, \"w\")\nf.write(bit) # write 1 if bit else 0\nf.write_bits(bits, count) # write 'count bits'\nf.close()\n```\n\nThese are same\n\n```py\nf.write_bits(bits, count)\n\nfor i in range(count-1, -1, -1):\n if bits & (1 << i):\n f.write(1)\n else:\n f.write(0)\n```\n\nothe interface\n\n```py\nl = []\nwrapper = ByteWrapper(l.append)\nf = bit_wrap(wrapper, \"w\")\nf.write_bits(0b110000101, 10)\nprint l # [\"a\"]\nf.close()\nprint l # [\"a\", \"@\"]\n```\n", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/hinohi/bitio", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "bitio", "package_url": "https://pypi.org/project/bitio/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/bitio/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/hinohi/bitio" }, "release_url": "https://pypi.org/project/bitio/0.2/", "requires_dist": null, "requires_python": null, "summary": "Input/output utirites of a bit-basis file", "version": "0.2" }, "last_serial": 2093344, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "d5473ed0aabdea7026531463fd7f51ea", "sha256": "06985d9cfef09d2b4d6a90c7963cd4bd2f24ec9d05ee2c8ad7212b2afc972047" }, "downloads": -1, "filename": "bitio-0.1.tar.gz", "has_sig": false, "md5_digest": "d5473ed0aabdea7026531463fd7f51ea", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1357, "upload_time": "2016-04-30T04:50:23", "url": "https://files.pythonhosted.org/packages/87/62/4a8dfabc0deb382c96806fcc130e01438c988b23d4448afb5e7f59f00afb/bitio-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "063b6ae57f498d185ab7029cce177db0", "sha256": "3bdb250fe7d09c9c8332525fa5b0beee206331af2c79291d669a877ea39e3a9e" }, "downloads": -1, "filename": "bitio-0.1.1.tar.gz", "has_sig": false, "md5_digest": "063b6ae57f498d185ab7029cce177db0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1662, "upload_time": "2016-04-30T05:23:59", "url": "https://files.pythonhosted.org/packages/8c/cb/35a867dfd77ad9cef8cdfb1a975722703928f3203d2224712a71f787c13b/bitio-0.1.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "d5578bf130f093486c30450784ce156e", "sha256": "dfdde32d0064eecc13ee2a0cc5da329bff05ec702460c67ece05ed4669570637" }, "downloads": -1, "filename": "bitio-0.2.tar.gz", "has_sig": false, "md5_digest": "d5578bf130f093486c30450784ce156e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2073, "upload_time": "2016-05-01T10:17:03", "url": "https://files.pythonhosted.org/packages/9d/e1/206fa6591bf465316849476e2628d35fddfb7b89d0cd70ea2fa90e25388f/bitio-0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d5578bf130f093486c30450784ce156e", "sha256": "dfdde32d0064eecc13ee2a0cc5da329bff05ec702460c67ece05ed4669570637" }, "downloads": -1, "filename": "bitio-0.2.tar.gz", "has_sig": false, "md5_digest": "d5578bf130f093486c30450784ce156e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2073, "upload_time": "2016-05-01T10:17:03", "url": "https://files.pythonhosted.org/packages/9d/e1/206fa6591bf465316849476e2628d35fddfb7b89d0cd70ea2fa90e25388f/bitio-0.2.tar.gz" } ] }