#pragma once #include #include #include template inline T bswap(T value); template<> inline int16_t bswap(int16_t value) { return __bswap_16(value); } template<> inline uint16_t bswap(uint16_t value) { return __bswap_16(value); } template<> inline int32_t bswap(int32_t value) { return __bswap_32(value); } template<> inline uint32_t bswap(uint32_t value) { return __bswap_32(value); } template<> inline int64_t bswap(int64_t value) { return __bswap_64(value); } template<> inline uint64_t bswap(uint64_t value) { return __bswap_64(value); }