McSinyx on Nostr: Hmmm npub1a3hfc…9m44m, doesn’t seem to be POSIX, but most libc seem to provide ...
Hmmm npub1a3hfcvq3wa9zggsur737r9j095kh76rqy46we58jzu345xl4n3eqz9m44m (npub1a3h…m44m), doesn’t seem to be POSIX, but most libc seem to provide bswap(3) which I’d use optionally #if the target is big endian, then cast to the target struct.
I don’t think there’s a better way at machine level, e.g. in Zig with comptime and @byteSwap builtin it would look less like a hack but 🤷
I don’t think there’s a better way at machine level, e.g. in Zig with comptime and @byteSwap builtin it would look less like a hack but 🤷