# BinaryStream
BinaryStream library for python
## What is it?
This is a library for convenient serialization of standard C/C++ types similar to that used for example in RakNet
protocol.
## Installation
**For Linux/Mac**
```commandline
pip3 install binary-stream
```
**For Windows**
```commandline
pip install binary-stream
```
## Usage
**Example**
```python
from binary_stream import BinaryStream
write_stream = BinaryStream()
write_stream.write_int8(42)
write_stream.write_bool(True)
write_stream.write_bool(True)
data = write_stream.get_buffer()
print(data.hex())
read_stream = BinaryStream(data)
print(read_stream.read_int8())
print(read_stream.read_bool())
print(read_stream.read_bool())
```
## Credits
This project is inspired by [binary_utils](https://github.com/Podrum/binary_utils)
## License
This project is open sourced under MIT license, see the [LICENSE](LICENSE) file for more details.
Raw data
{
"_id": null,
"home_page": "https://github.com/TheMade4/BinaryStream",
"name": "binary-stream",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "utils,binary,binary-stream,python3",
"author": "TheMade4",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/d1/8c/a7b3b43874b1c4164f69dd66721d2fd585379dd6e1939e449ed5cba43cbf/binary-stream-1.0.1.tar.gz",
"platform": null,
"description": "# BinaryStream\n\nBinaryStream library for python\n\n## What is it?\n\nThis is a library for convenient serialization of standard C/C++ types similar to that used for example in RakNet\nprotocol.\n\n## Installation\n\n**For Linux/Mac**\n\n```commandline\npip3 install binary-stream\n```\n\n**For Windows**\n\n```commandline\npip install binary-stream\n```\n\n## Usage\n\n**Example**\n\n```python\nfrom binary_stream import BinaryStream\n\nwrite_stream = BinaryStream()\n\nwrite_stream.write_int8(42)\nwrite_stream.write_bool(True)\nwrite_stream.write_bool(True)\n\ndata = write_stream.get_buffer()\nprint(data.hex())\n\nread_stream = BinaryStream(data)\n\nprint(read_stream.read_int8())\nprint(read_stream.read_bool())\nprint(read_stream.read_bool())\n```\n\n## Credits\n\nThis project is inspired by [binary_utils](https://github.com/Podrum/binary_utils)\n\n## License\n\nThis project is open sourced under MIT license, see the [LICENSE](LICENSE) file for more details.\n",
"bugtrack_url": null,
"license": "MIT License",
"summary": "",
"version": "1.0.1",
"project_urls": {
"Homepage": "https://github.com/TheMade4/BinaryStream"
},
"split_keywords": [
"utils",
"binary",
"binary-stream",
"python3"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "db302130d0094d32abb41edd5e18d49a837a2086504c01c0a1ec3382d5d8979a",
"md5": "9f4a1cd4767194fc4b217631c81a2d52",
"sha256": "aeb09ece77d8d6a3f5963b50f6e6d00e300b74d50378db1015f16979fb6f90b6"
},
"downloads": -1,
"filename": "binary_stream-1.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "9f4a1cd4767194fc4b217631c81a2d52",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 3444,
"upload_time": "2023-12-16T14:59:33",
"upload_time_iso_8601": "2023-12-16T14:59:33.849927Z",
"url": "https://files.pythonhosted.org/packages/db/30/2130d0094d32abb41edd5e18d49a837a2086504c01c0a1ec3382d5d8979a/binary_stream-1.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "d18ca7b3b43874b1c4164f69dd66721d2fd585379dd6e1939e449ed5cba43cbf",
"md5": "cfea88b2db08fb4a2556a9b68e75baec",
"sha256": "8480cb988c03943d20c78111f9c1927e6352cbb03655158342746eb3036b673e"
},
"downloads": -1,
"filename": "binary-stream-1.0.1.tar.gz",
"has_sig": false,
"md5_digest": "cfea88b2db08fb4a2556a9b68e75baec",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3537,
"upload_time": "2023-12-16T14:59:35",
"upload_time_iso_8601": "2023-12-16T14:59:35.327382Z",
"url": "https://files.pythonhosted.org/packages/d1/8c/a7b3b43874b1c4164f69dd66721d2fd585379dd6e1939e449ed5cba43cbf/binary-stream-1.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-12-16 14:59:35",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "TheMade4",
"github_project": "BinaryStream",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "binary-stream"
}