Why Nostr? What is Njump?
2023-09-26 17:23:05
in reply to

McSinyx on Nostr: Hmmm npub1a3hfc…9m44m, doesn’t seem to be POSIX, but most libc seem to provide ...

Hmmm , 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 🤷
Author Public Key
npub1ahk99r5ze4jdm390a7lr9e9jay2x64mg7khage27kyxtqmwzz0fsuprlfs