BinaryPacking
C extension for packing and unpacking numeric values (ints, floats, bools, pointers) as binary data. Supports fixed-width little/big-endian formats and dense variable-length integers.
Install
pip install BinaryPacking
Usage
from BinaryPacking import Packing
Packing.PackInt32(258) # b'\x02\x01\x00\x00'
Packing.UnPackInt32(b"\x02\x01\x00\x00") # 258
Packing.PackUInt32(0x1234, "big") # b'\x00\x00\x12\x34'
Build from source
- Windows:
build.bat(alsobuild.bat wheel,build.bat clean) - Make:
make build,make wheel,make dist,make upload,make clean
License
MIT
Metadata
Release files for BinaryPacking 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| binarypacking-1.0.0.tar.gz | 12.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| binarypacking-1.0.0-cp313-cp313-win_amd64.whl | CPython 3.13 | CPython 3.13 | Windows x86-64 | Details |
Total release size: 34.6 kB
Release files / binarypacking-1.0.0.tar.gz
| Download URL | binarypacking-1.0.0.tar.gz |
|---|---|
| Size | 12.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
301429ea83e51e8b420240f143b6d8cc633bde9a285b70d3e70f9fa386d593e3
|
|
BLAKE2b-256 checksum How to use checksums |
95228cabe57842b80a2ec112e3097fae4e4b91220e942a5cda9c3e5848d20ef3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.11
|
Release files / binarypacking-1.0.0-cp313-cp313-win_amd64.whl
| Download URL | binarypacking-1.0.0-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 21.7 kB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
f1c99122be12d250204d37d619658aabcdc90f826c7b28fc78b9c908170e95c5
|
|
BLAKE2b-256 checksum How to use checksums |
e3864ec1dc115bbfe549b62ec3b69bfba43e4228a25ff24f0187c172fcffa377
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.11
|