NSUNI/NSLAR Library a250670
Loading...
Searching...
No Matches
nnl::utl::data Namespace Reference

Provides functions and classes for handling binary data. More...

Classes

class  MD5Context
 A utility class for calculating MD5 message digests. More...

Functions

constexpr u32 FourCC (const char(&str)[5]) noexcept
 Generates a numeric four character code from a given string.
template<typename T>
SwapEndian (T src) noexcept
 Swaps endianness of a value.
template<typename E>
constexpr std::underlying_type< E >::type as_int (E e) noexcept
 Converts an enum value to its underlying integer type.
template<class T, class U>
constexpr T narrow_cast (U &&u) noexcept
 Narrowing cast without bounds checking.
template<class T, class U, typename std::enable_if< std::is_arithmetic< T >::value >::type * = nullptr>
constexpr T narrow (U u)
 Safe narrowing cast with runtime bounds checking.
u32 CRC32 (BufferView data, u32 polynomial=0xEDB88320) noexcept
 Calculates a CRC32 checksum.
u32 XXH32 (BufferView data, u32 seed=0xC0108888)
 Calculates an XXH32 checksum.
std::array< u8, 16 > MD5 (BufferView data) noexcept
 Calculates an MD5 checksum.
template<typename To, typename From>
auto ReinterpretContainer (const std::vector< From > &container)
 Reinterprets container data as a different type (via a bitwise copy)
template<typename To, typename From>
auto CastContainer (const std::vector< From > &container)
 Casts container elements to a different type.

Detailed Description

Provides functions and classes for handling binary data.