Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Aurora2500 |
According to the docs for the binary serialization API
Each packet is stored with a 4 byte header indicating the type of the data stored, and then the data itself, depending on the type.
But when I use store_var
, it seems like there is an aditional 4 bytes in the header of each packet.
When I execute store_var(42)
, I’d expect to see:
00000010 00000000 00000000 00000000
00101010 00000000 00000000 00000000
With the first 4 bytes being a 2, indicating that it is an int, and the last 4 bytes being the number 42 encoded in binary.
Instead what I get is:
00001000 00000000 00000000 00000000
00000010 00000000 00000000 00000000
00101010 00000000 00000000 00000000
And I can’t seem to figure out what the first 4 bytes are meant to be here.
Is the documentation outdated?