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.0.tar.gz
(3.5 kB
view hashes)
Built Distribution
Close
Hashes for binary_stream-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c2225ee1846843b633f205c92f68740162cff251fbd223ee4a6a350fb22a29c1 |
|
MD5 | 80ccd92567c0e26730c28f6ab5bf7def |
|
BLAKE2b-256 | 10549ccca99a95bb22bba4f7af3f907b49f64ac0e45715dbc63ad5e69cb2c780 |