https://github.com/demberto/bytesioex
A simple wrapper over io.BytesIO which allows reading and writing C data types directly
https://github.com/demberto/bytesioex
deserialization libraries python serialization
Last synced: 2 months ago
JSON representation
A simple wrapper over io.BytesIO which allows reading and writing C data types directly
- Host: GitHub
- URL: https://github.com/demberto/bytesioex
- Owner: demberto
- License: mit
- Created: 2021-09-13T14:46:11.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-05-29T12:58:23.000Z (almost 3 years ago)
- Last Synced: 2025-02-28T16:57:00.551Z (3 months ago)
- Topics: deserialization, libraries, python, serialization
- Language: Python
- Homepage:
- Size: 32.2 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# BytesIOEx


[![Code Style: Black][black]](https://github.com/psf/black)
[![security: bandit][bandit]](https://github.com/PyCQA/bandit)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][docs].
## 🚀 Roadmap
- [ ] Ensure full coverage.
- [ ] Add `wchar` (UTF-16 character) support.
- [ ] Support for different byte orders.## ❕ Motivation
C# `BinaryReader` and `BinaryWriter`.
## 📧 Contact
E-mail: [email protected]
## © License
BytesIOEx is distributed under the [MIT License][license].
[bandit]: https://img.shields.io/badge/security-bandit-yellow.svg
[black]: https://img.shields.io/badge/code%20style-black-black[docs]: https://bytesioex.rtfd.io/en/latest/
[license]: https://github.com/demberto/BytesIOEx/blob/master/LICENSE