How to understand below struct size? I wish to calculate it by sum all items but looks like it's not correct:
import struct
s = struct.Struct('<8s 10I 16s 512s 32s 1024s')
total = 8 + 10 + 16 + 512 + 32 + 1024
print("total:",total)
print("size:",s.size)
The output is:
: total: 1602
: size: 1632
1602 is the total sum of items, but actually the size is 1632!