|
iceberg-cpp
|
Endianness conversion utilities. More...
#include <bit>#include <concepts>#include <cstdint>#include <cstring>Go to the source code of this file.
Concepts | |
| concept | iceberg::EndianConvertible |
| Concept for values that can be converted to/from another endian format. | |
Functions | |
| template<EndianConvertible T> | |
| constexpr T | iceberg::ByteSwap (T value) |
| Byte-swap a value. For floating-point types, only support 32-bit and 64-bit floats. | |
| template<EndianConvertible T> | |
| constexpr T | iceberg::ToLittleEndian (T value) |
| Convert a value to little-endian format. | |
| template<EndianConvertible T> | |
| constexpr T | iceberg::FromLittleEndian (T value) |
| Convert a value from little-endian format. | |
| template<EndianConvertible T> | |
| constexpr T | iceberg::ToBigEndian (T value) |
| Convert a value to big-endian format. | |
| template<EndianConvertible T> | |
| constexpr T | iceberg::FromBigEndian (T value) |
| Convert a value from big-endian format. | |
| template<EndianConvertible T> | |
| void | iceberg::WriteLittleEndian (T value, void *output) |
| Write a value in little-endian format to a buffer. | |
| template<EndianConvertible T> | |
| T | iceberg::ReadLittleEndian (const void *input) |
| Read a value in little-endian format from a buffer. | |
Endianness conversion utilities.
| T iceberg::ReadLittleEndian | ( | const void * | input | ) |
Read a value in little-endian format from a buffer.
| void iceberg::WriteLittleEndian | ( | T | value, |
| void * | output | ||
| ) |
Write a value in little-endian format to a buffer.