core: Provide functions for different byte orders

Rationale: see #1586.