I try to use encoding/binary to read a binary file which is generated by C.
Assume a variable v declared with type T.
In C, the packed structure size can easy get by sizeof(T) or sizeof(v).
In Go, I could use unsafe.Sizeof(v).
But, I found the unsafe.Sizeof(v) is larger then C's sizeof(T).
I've compared the binary data which read from encoding/binary, it is correct.
I guess the extra bytes in Go is depend on Go implementation.
Is there any method in unsafe could get the C's sizeof?
I wish use this value to estimate binary file size.