No project description provided
Project description
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
pip3 install binary-stream
For Windows
pip install binary-stream
Usage
Example
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
License
This project is open sourced under MIT license, see the LICENSE file for more details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
binary-stream-1.0.1.tar.gz
(3.5 kB
view details)
Built Distribution
File details
Details for the file binary-stream-1.0.1.tar.gz
.
File metadata
- Download URL: binary-stream-1.0.1.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8480cb988c03943d20c78111f9c1927e6352cbb03655158342746eb3036b673e |
|
MD5 | cfea88b2db08fb4a2556a9b68e75baec |
|
BLAKE2b-256 | d18ca7b3b43874b1c4164f69dd66721d2fd585379dd6e1939e449ed5cba43cbf |
File details
Details for the file binary_stream-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: binary_stream-1.0.1-py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | aeb09ece77d8d6a3f5963b50f6e6d00e300b74d50378db1015f16979fb6f90b6 |
|
MD5 | 9f4a1cd4767194fc4b217631c81a2d52 |
|
BLAKE2b-256 | db302130d0094d32abb41edd5e18d49a837a2086504c01c0a1ec3382d5d8979a |