mirror of
https://github.com/aziascreations/PB-MessagePack.git
synced 2026-11-03 17:01:24 +01:00
30ad7aff2af053be1b40fbc6620e2198cdc736a4
PureBasic - MsgPack
PureBasic Include for serializing and deserializing MessagePack data.
Based on the msgpack/msgpack specification.
Features
- Full support of the MessagePack specification
- Explicit or implicit data formats when reading/writing
- ReadInteger vs ReadI8/ReadU8/...
Fully documented
Limitations
- No custom
malloc/realloc/freecallbacks - More involved Map and Array interactions
- No dynamic typing
- Building arrays/maps requires special insertion in parent MsgPack
(See examples) - Lots of internal checks for boundaries and counts before any reading can be done
- Usage of larger
.qtype for field sizes- Helps prevent unsigned numbers causing issues on x86
- Particular handling of
NaNfor Float32 and Float640x7F800001gets returned as0x7FC00001(x87 FPU limitation)- ARM64 untested yet
- No implementation of the Timestamp extension
Usage
Submodule
Adding as a submodule:
git submodule add https://github.com/aziascreations/PB-MessagePack.git Includes/PB-MessagePack
Pull latest submodule version:
git submodule update --init --recursive
TODO: Add note about handling pre-inclusion of PB-Endianness
Inclusion
...
Examples
Explicit vs Implicit typing
Cloning
Use this command to clone the repository and its submodules:
git clone --recurse-submodules https://github.com/aziascreations/PB-MessagePack.git
If you forgot the submodules, use this command:
git submodule update --init --recursive
Special Thanks
- AndyMK / agorangetek
- PureBasic Visual Studio Code Extension (GitHub repository)
- Louis Somers
- LsMsgPack windows utility (GitHub repository)
License
All the code in this repo is released in the Public Domain.
Languages
PureBasic
92.9%
PowerShell
4%
C#
1.8%
Python
1.3%