How to read Unsigned integer from binary file?
How to read 开发者_JAVA技巧"Unsigned 8/16/24/32/64-bit integer" from binary file ? ( big-endian byte order ) unpack ? any examples ?
Use the struct module. That covers 8,16,32 and 64 bits. 24 bits you will need to do some extra fiddling yourself
Examples are here
精彩评论