{ "info": { "author": "Scott Griffiths", "author_email": "dr.scottgriffiths@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.0", "Programming Language :: Python :: 3.1", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": ".. image:: https://travis-ci.org/scott-griffiths/bitstring.svg?branch=master\r\n :target: https://travis-ci.org/scott-griffiths/bitstring\r\n\r\n================\r\nbitstring module\r\n================\r\n\r\n**bitstring** is a pure Python module designed to help make\r\nthe creation and analysis of binary data as simple and natural as possible.\r\n\r\nBitstrings can be constructed from integers (big and little endian), hex,\r\noctal, binary, strings or files. They can be sliced, joined, reversed,\r\ninserted into, overwritten, etc. with simple functions or slice notation.\r\nThey can also be read from, searched and replaced, and navigated in,\r\nsimilar to a file or stream.\r\n\r\nbitstring is open source software, and has been released under the MIT\r\nlicence.\r\n\r\nThis module works in both Python 2.7 and Python 3.\r\n\r\nDocumentation\r\n-------------\r\nThe manual for the bitstring module is available here\r\n. It contains a walk-through of all\r\nthe features and a complete reference section.\r\n\r\nIt is also available as a PDF as part of the source download.\r\n\r\nInstallation\r\n------------\r\nIf you have downloaded and unzipped the package then you need to run the\r\n``setup.py`` script with the 'install' argument::\r\n\r\n python setup.py install\r\n\r\nYou may need to run this with root privileges on Unix-like systems.\r\n\r\n\r\nIf you haven't yet downloaded the package then you can just try::\r\n\r\n easy_install bitstring\r\n\r\nor ::\r\n\r\n pip install bitstring \r\n\r\n\r\nSimple Examples\r\n---------------\r\nCreation::\r\n\r\n >>> a = BitArray(bin='00101')\r\n >>> b = Bits(a_file_object)\r\n >>> c = BitArray('0xff, 0b101, 0o65, uint:6=22')\r\n >>> d = pack('intle:16, hex=a, 0b1', 100, a='0x34f')\r\n >>> e = pack('<16h', *range(16))\r\n\r\nDifferent interpretations, slicing and concatenation::\r\n\r\n >>> a = BitArray('0x1af')\r\n >>> a.hex, a.bin, a.uint\r\n ('1af', '000110101111', 431)\r\n >>> a[10:3:-1].bin\r\n '1110101'\r\n >>> 3*a + '0b100'\r\n BitArray('0o0657056705674')\r\n\r\nReading data sequentially::\r\n\r\n >>> b = BitStream('0x160120f')\r\n >>> b.read(12).hex\r\n '160'\r\n >>> b.pos = 0\r\n >>> b.read('uint:12')\r\n 352\r\n >>> b.readlist('uint:12, bin:3')\r\n [288, '111']\r\n\r\nSearching, inserting and deleting::\r\n\r\n >>> c = BitArray('0b00010010010010001111') # c.hex == '0x1248f'\r\n >>> c.find('0x48')\r\n (8,)\r\n >>> c.replace('0b001', '0xabc')\r\n >>> c.insert('0b0000')\r\n >>> del c[12:16]\r\n\r\nUnit Tests\r\n----------\r\n\r\nThe 400+ unit tests should all pass for Python 2.7 and later.\r\n\r\n----\r\n\r\nThe bitstring module has been released as open source under the MIT License.\r\nCopyright (c) 2016 Scott Griffiths\r\n\r\nFor more information see the project's homepage on GitHub:\r\n\r\n\r\n", "description_content_type": null, "docs_url": null, "download_url": "https://pypi.python.org/pypi/bitstring/", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/scott-griffiths/bitstring", "keywords": "", "license": "The MIT License: http://www.opensource.org/licenses/mit-license.php", "maintainer": "", "maintainer_email": "", "name": "thread-bitstring", "package_url": "https://pypi.org/project/thread-bitstring/", "platform": "all", "project_url": "https://pypi.org/project/thread-bitstring/", "project_urls": { "Download": "https://pypi.python.org/pypi/bitstring/", "Homepage": "https://github.com/scott-griffiths/bitstring" }, "release_url": "https://pypi.org/project/thread-bitstring/3.1.5/", "requires_dist": null, "requires_python": "", "summary": "Simple construction, analysis and modification of binary data.", "version": "3.1.5" }, "last_serial": 3188737, "releases": { "3.1.5": [ { "comment_text": "", "digests": { "md5": "227662174dc7c870ac012aff6dc4836f", "sha256": "080d83f71ec27a1e65f8ba84dd39a58ddfc419dc6e233e2503cbb8f87e580918" }, "downloads": -1, "filename": "thread_bitstring-3.1.5-py2-none-any.whl", "has_sig": false, "md5_digest": "227662174dc7c870ac012aff6dc4836f", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 38124, "upload_time": "2017-09-20T15:39:54", "url": "https://files.pythonhosted.org/packages/08/34/4b4e322d9e6cb113676cd0ba98c550e5e644380ae9d76a0ad8db74eaf2ed/thread_bitstring-3.1.5-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8a059e610d42ad63326153fd2258c390", "sha256": "e1eef24197526b45cf6c7adb099a0e162cad89c7b49d855e6bca8e674ed4b60e" }, "downloads": -1, "filename": "thread-bitstring-3.1.5.tar.gz", "has_sig": false, "md5_digest": "8a059e610d42ad63326153fd2258c390", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 624417, "upload_time": "2017-09-20T15:39:51", "url": "https://files.pythonhosted.org/packages/5d/a3/a43bbb2a0fac19e300c8caa42dfbd9eebccaaca02dcb606f5505489075d8/thread-bitstring-3.1.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "227662174dc7c870ac012aff6dc4836f", "sha256": "080d83f71ec27a1e65f8ba84dd39a58ddfc419dc6e233e2503cbb8f87e580918" }, "downloads": -1, "filename": "thread_bitstring-3.1.5-py2-none-any.whl", "has_sig": false, "md5_digest": "227662174dc7c870ac012aff6dc4836f", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 38124, "upload_time": "2017-09-20T15:39:54", "url": "https://files.pythonhosted.org/packages/08/34/4b4e322d9e6cb113676cd0ba98c550e5e644380ae9d76a0ad8db74eaf2ed/thread_bitstring-3.1.5-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8a059e610d42ad63326153fd2258c390", "sha256": "e1eef24197526b45cf6c7adb099a0e162cad89c7b49d855e6bca8e674ed4b60e" }, "downloads": -1, "filename": "thread-bitstring-3.1.5.tar.gz", "has_sig": false, "md5_digest": "8a059e610d42ad63326153fd2258c390", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 624417, "upload_time": "2017-09-20T15:39:51", "url": "https://files.pythonhosted.org/packages/5d/a3/a43bbb2a0fac19e300c8caa42dfbd9eebccaaca02dcb606f5505489075d8/thread-bitstring-3.1.5.tar.gz" } ] }