Closed oscbyspro closed 1 year ago
Somebody, please ban big endianness. Such headache. No benefit.
But is it possible to implement var byteSwapped: Self
in words order? What would it do on big-endian platforms? Looking at littleEndian
's and bigEndian
's documentation
If necessary, the byte order of this value is reversed from the typical byte order of this integer type. On a little-endian platform, for any integer x, x == x.littleEndian.
If necessary, the byte order of this value is reversed from the typical byte order of this integer type. On a big-endian platform, for any integer x, x == x.bigEndian.
it seems like they require platform-endian in-memory representations (which I have). Hm.
Again: somebody, please ban big endianness. Such headache. No benefit.
Hm. I think DoubleWidth would be much simpler if it were stored in
words
order.Pros
#if _endian(...)
stuff.TwinHeaded<Base>
from the project.withContigous[Mutable]Storage(_:)
is made viable.Cons
UInt
chunking is trickier..bigEndian
) is trickier.