Updated byte-order conversion functions.