I would like to read and decodinga binary file in order to get values.
Below the code I use to read the file :
with open("modele_petite_zone.op2", "rb") as op2File :
for lines in op2File :
byte = op2File.read()
print(byte)
and here a part of what I have in output :
b'\xaf\xc9Dq\xdd\xa8\xc44\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\xdd\x1f\x004\x08\x00\x00\x00\xb0\x97EHq\xccD{\xdc\xc3\xc44\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\xdd\x1f\x004\x08\x00\x00\x00\xb0\x97E3S\xc1D{4\xbf\xc44\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa8\xdd\x1f\x004\x08\x00\x00\x00\xb0\x97E\xe1\xc2\xc2D\xc3\xed\xd7\xc44\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa9\xdd\x1f\x004\x08\x00\x00\x00\xb0\x97Ef\xb6\xb7D\xa4\xd8\xd1\xc44\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\xdd\x1f\x004\x08\x00\x00\x00\xb0\x97ER\x10\xb7DR\xc8\xea\xc44\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb5\xdd\x1f\x004\x08\x00\x00\x00\xb0\x97E\xa40\xacD\xec1\xe3\xc44\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbc\xdd\x1f\x004\x08\x00\x00\x00\xb0\x97E\xcd|\xa9D\x00@\xfc\xc44\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbd\xdd\x1f\x004\x08\x00\x00\x00\xb0\x97E\x1f\xed\x9eD\x1f\x15\xf3\xc44\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xec\x01\x00\x00\x04\x00\x00\x00\xfb\xff\xff\xff\x04\x00\x00\x00\x04\x00\x00\x00\x01\x00\x00\x00\x04\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x04\x00\x00\x00\x03\x00\x00\x00\x04\x00\x00\x00\x0c\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x0c\x00\x00\x00\x04\x00\x00\x00\xfa\xff\xff\xff\x04\x00\x00\x00\x04\x00\x00\x00\x01\x00\x00\x00\x04\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x04\x00\x00\x00\x02\x00\x00\x00\x04\x00\x00\x00\x08\x00\x00\x00GEOM3
What can I do to decoding the ouptut ?
Binary file can be downloaded here : https://www.dropbox.com/s/uimba2xojc55uii/modele_petite_zone.op2?dl=0