chsvlib
chsv helper source code

◆ mirror_bits_kbo() [2/2]

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

Inverts a bit order of data keeping its byte order and writes the result to a possibly different buffer.

Parameters
[out]pResultAn output buffer to receive the inverse data.
[in]pApiPoints to the input data of the byte size given by cbApi.
cbApiSize of the input data, in bytes.

Unlike mirror_bits, this function inverts only the current bit order within each byte of pResult leaving the byte order unchanged.