#ifndef CORE_FXCRT_BYTEORDER_H_
#define CORE_FXCRT_BYTEORDER_H_
#include <stdint.h>
#include "build/build_config.h"
#include "core/fxcrt/span.h"
#if defined(COMPILER_MSVC)
#include <stdlib.h>
#endif
namespace fxcrt {
namespace internal {
#if defined(COMPILER_MSVC) && !defined(__clang__)
#define FXCRT_BYTESWAPS_CONSTEXPR
#else
#define FXCRT_BYTESWAPS_CONSTEXPR …
#endif
inline FXCRT_BYTESWAPS_CONSTEXPR uint16_t ByteSwap(uint16_t x) { … }
inline FXCRT_BYTESWAPS_CONSTEXPR uint32_t ByteSwap(uint32_t x) { … }
#undef FXCRT_BYTESWAPS_CONSTEXPR
}
inline uint16_t FromLE16(uint16_t x) { … }
inline uint32_t FromLE32(uint32_t x) { … }
inline uint16_t FromBE16(uint16_t x) { … }
inline uint32_t FromBE32(uint32_t x) { … }
inline uint16_t GetUInt16MSBFirst(pdfium::span<const uint8_t, 2> span) { … }
inline uint32_t GetUInt32MSBFirst(pdfium::span<const uint8_t, 4> span) { … }
inline uint16_t GetUInt16LSBFirst(pdfium::span<const uint8_t, 2> span) { … }
inline uint32_t GetUInt32LSBFirst(pdfium::span<const uint8_t, 4> span) { … }
inline void PutUInt16MSBFirst(uint16_t value, pdfium::span<uint8_t, 2> span) { … }
inline void PutUInt32MSBFirst(uint32_t value, pdfium::span<uint8_t, 4> span) { … }
inline void PutUInt16LSBFirst(uint16_t value, pdfium::span<uint8_t, 2> span) { … }
inline void PutUInt32LSBFirst(uint32_t value, pdfium::span<uint8_t, 4> span) { … }
}
#endif