A simple wrapper over io.BytesIO which allows reading and writing C data types
Project description
BytesIOEx
BytesIOEx is a simple wrapper over Python's io.BytesIO which provides
additional methods for reading and writing C data types like int8,
uint8, bool and so on. The read_* methods are used for reading a
particular type from the stream and the write_* methods are used for writing
Python's basic data types int, bool and float to the stream. Both
these types of methods advance the steam position by the size of the data type.
The type conversion is handled by the struct module. Struct classes are
used to maximize the performance. Native byteorder is used.
⏬ Installation
BytesIOEx requires Python 3.6+, it may run on older version as well but I have not tested it.
pip install --upgrade bytesioex
📜 Documentation
Docs are available on ReadTheDocs.
🚀 Roadmap
- Ensure full coverage.
- Add
wchar(UTF-16 character) support. - Support for different byte orders.
❕ Motivation
C# BinaryReader and BinaryWriter.
📧 Contact
E-mail: demberto@protonmail.com
© License
BytesIOEx is distributed under the MIT License.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bytesioex-0.1.2.tar.gz.
File metadata
- Download URL: bytesioex-0.1.2.tar.gz
- Upload date:
- Size: 9.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d8dc27ca745ce721a61fa44b83367ae07729b7e675e762e868b85b247e3cd513
|
|
| MD5 |
a3a4fb1427396fc86df36ee91f0a2a2d
|
|
| BLAKE2b-256 |
ca3a9eca782b963024b007f17d4a2db56d83630d0eca3cc53a2cd3fc21bc5296
|
File details
Details for the file bytesioex-0.1.2-py3-none-any.whl.
File metadata
- Download URL: bytesioex-0.1.2-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f285046895754d705e11bdb7c793839276348a93b5e9664085d81dc7aa502074
|
|
| MD5 |
30201c451a8dc14fa2433d72d40f3da6
|
|
| BLAKE2b-256 |
1ac291046e7c3c444de2e9890d82ac82bd9a27555ec6e9c8178e0df6cf948b1f
|