Binary files on 32-bit / 64-bit systems?

I am using a pythonstruct module to create custom binaries.

The file itself has the following format:

4 bytes(integer) 1 byte(unsigned char) 4 bytes(float)

4 bytes(integer) 1 byte(unsigned char) 4 bytes(float)

.......................... ( 100,000 such lines )

4 bytes(integer) 1 byte(unsigned char) 4 bytes(float)


I am currently using a 32 bit machine to create these custom binaries. I plan to switch to a 64-bit machine soon.

Will I be able to read / write the same files using both machines {32bit / 64bit}? or should I expect compatibility issues?

(I will use Ubuntu Linux for both)

+3
source share
3 answers

" " (< >), " " (@), -.

+2

You have more problems than 32-bit and 64-bit. The broad category you are talking about is called serialization.

Take a look at marshal and / or pickle .

+1
source

All Articles