Add cross-platform byte order conversions