Re:The Byte Order Fiasco
by joppy on Saturday May 08, 2021 @10:29AM
(#27087427)
Why is it an issue any more than say, order of fields in a struct is an issue? In one case you read bytes off the disk by doing ((b[0] << 8) | b[1]) (or equivalent), with the order reversed the other way around. Any application-level (say, not a compiler, debugger, etc) program should not even need to know the native byte order, it should only need to know the encoding that the file it’s trying to read used.
[ Parent
| on HN ]
> order of fields in a struct
This is defined in C to be the order the fields are declared in.
Re:The Byte Order Fiasco
by occamrazor on Saturday May 08, 2021 @01:25PM
(#27089074)
But the padding rules between fields are a mess.