MCPcopy Create free account
hub / github.com/F-Stack/f-stack / BIT_flushBitsFast

Function BIT_flushBitsFast

freebsd/contrib/zstd/lib/common/bitstream.h:228–237  ·  view source on GitHub ↗

! BIT_flushBitsFast() : * assumption : bitContainer has not overflowed * unsafe version; does not check buffer overflow */

Source from the content-addressed store, hash-verified

226 * assumption : bitContainer has not overflowed
227 * unsafe version; does not check buffer overflow */
228MEM_STATIC void BIT_flushBitsFast(BIT_CStream_t* bitC)
229{
230 size_t const nbBytes = bitC->bitPos >> 3;
231 assert(bitC->bitPos < sizeof(bitC->bitContainer) * 8);
232 assert(bitC->ptr <= bitC->endPtr);
233 MEM_writeLEST(bitC->ptr, bitC->bitContainer);
234 bitC->ptr += nbBytes;
235 bitC->bitPos &= 7;
236 bitC->bitContainer >>= nbBytes*8;
237}
238
239/*! BIT_flushBits() :
240 * assumption : bitContainer has not overflowed

Callers

nothing calls this directly

Calls 1

MEM_writeLESTFunction · 0.70

Tested by

no test coverage detected