On big-endian architecture where size_t is a 64-bit long,
copying the 4 first bytes as the size is incorrect. We cast it to an
unsigned 32-bit integer before copying it at the beginning of the
Fix compression on big-endian architecture
Looking at this I guess ideally storing network ordered and converting to host byte order on receive would make most change (but also break backwards compatibility).
I don't think it is worth it.
I opened a pull, which fixes the issue in a backwards compatible manner. Haven't merged yet because not sure if it's worth it (in practice x86/x86-64 will be used by the majority).