iceberg-cpp
Loading...
Searching...
No Matches
Namespaces | Concepts | Functions
endian.h File Reference

Endianness conversion utilities. More...

#include <bit>
#include <concepts>
#include <cstdint>
#include <cstring>

Go to the source code of this file.

Namespaces

namespace  iceberg
 Core Apache Iceberg C++ APIs.
 

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>
iceberg::ReadLittleEndian (const void *input)
 Read a value in little-endian format from a buffer.
 
template<EndianConvertible T>
void iceberg::WriteBigEndian (T value, void *output)
 Write a value in big-endian format to a buffer.
 
template<EndianConvertible T>
iceberg::ReadBigEndian (const void *input)
 Read a value in big-endian format from a buffer.
 

Detailed Description

Endianness conversion utilities.