Helpers for parsing and writing binary data created by dotnet System.IO.BinaryWriters.
Project description
pyCSBinaryWriter
A simple library for .NET binary (de)serialization.
This package gives developers access to simple method calls from decoding binary data written by .NET BinaryWriter.
Limitations
- Decimal is not implemented yet. Pull requests are welcome.
- asyncio support is brand new and may be buggy.
Installation
$ pip install -U pycsbinarywriter
Usage
from pycsbinarywriter import cstypes
# Decode .NET 7-bit-prefixed string
assert 'abc123' == cstypes.string.unpack(b'\x06\x61\x62\x63\x31\x32\x33')
# Decode .NET uint8 (ubyte)
assert 127 == cstypes.uint8.unpack(b'\x7f')
# Encode .NET int16
assert b'\x2e\xfb' == cstypes.int16.pack(-1234)
License
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
File details
Details for the file pycsbinarywriter-0.1.2.tar.gz
.
File metadata
- Download URL: pycsbinarywriter-0.1.2.tar.gz
- Upload date:
- Size: 7.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a0894a4543b8dbb20bbcdfb75315c15877864dcbeb1b8275541cbe677d35ad83 |
|
MD5 | 4cfb266db3012c8a6e093553cd444fa0 |
|
BLAKE2b-256 | 57b3d34821ba8cfee95a0c3762a3474ea7b2f80f16309659d8a9e2b5c8386f94 |
File details
Details for the file pycsbinarywriter-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: pycsbinarywriter-0.1.2-py3-none-any.whl
- Upload date:
- Size: 11.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3982b0250863550059c410e6e5a02a935999caa7f0c746b6b9c686ade93949ba |
|
MD5 | 896e144b67ae888b19f819c9ae7a68c5 |
|
BLAKE2b-256 | 157489c8c2d68d684e33a12da2bfccc9ae2ad9b16a2726185f40b083092bee01 |