core: Provide functions for different byte orders

Rationale: see #1586.

same as above