That’s a good way to bypass that 4GB size limit, and instead of wasting 8 bytes per number this will even save a few bytes.
However, I’m not sure how easy it is to implement in the language you’re using. I only did that in C++ and modern C#. They both have intrinsics to emit BSWAP instruction (or an ARM equivalent) to flip byte order of an integer, helps with performance of that code.
That’s a good way to bypass that 4GB size limit, and instead of wasting 8 bytes per number this will even save a few bytes.
However, I’m not sure how easy it is to implement in the language you’re using. I only did that in C++ and modern C#. They both have intrinsics to emit BSWAP instruction (or an ARM equivalent) to flip byte order of an integer, helps with performance of that code.