I have created a python program using struct, that saves data in files. The data consists of a header (300 chars) and data (36000 int float pairs). On ubuntu this works and i can unpack the data for my php setup.
I unpack the data in php by loading the content into a string and using unpack. I quickly found that 1 pair off int float, consumed the same as 8 chars in the php string.
when I then moved this to windows, the data didn't take as much space, and when i try to unpack them in php, they seem to get unaligned from the binary string quickly.
Is there any way to get the struct in php to use the architecture to produce the same output as ubuntu?
I have tried the alligment options with struct (<,>,!,=).
My ubuntu dev setup is 64bit and the server is also 64bit. I have tried using both 32bit python and 64bit python on the windows server.
It ended up being python gzip, that shiftet all bytes. Destroying the data.
Python struct on windows