chsvlib
chsv helper source code

◆ byte_swap() [2/2]

void Chusov::Memory::byte_swap ( void *  pResult,
const void *  pApi,
std::size_t  cbApi 
)
noexcept

Inverses an order of bytes and writes the result to the destination buffer.

Parameters
[out]pResultis a pointer to an output buffer of cbApi bytes of size receiving the resulting block of data. The parameter may be equal to the pApi pointing the input that will be processed in place.
[in]pApiis an input buffer containing cbApi bytes of data to be processed.
cbApiis a byte size of data participating in the byte swap operation and a byte size of the output buffer.
See also
BYTESWAP_UINT32;
BYTESWAP_UINT64;
byte_swap_inplace.