chsvlib
chsv helper source code

◆ mirror_bits_kbo_inplace()

void Chusov::Memory::mirror_bits_kbo_inplace ( void *  pBuf,
std::size_t  cbBuf 
)
noexcept

Inverts a bit order within a vector keeping its byte order unchanged.

Parameters
[in,out]pBufPoints to data with a bit order to inverse.
cbBufSize of the data, in bytes.

Unlike mirror_bits_inplace, this function inverts only bits of each byte of pBuf keeping the byte order unchanged.

The mirror_bits_kbo and mirror_bits_kbo_copy functions allow to inverse bits order with copying of the result to a possibly another destination buffer while keeping the original data unchanged.