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

Function BIT_reloadDStreamFast

freebsd/contrib/openzfs/module/zstd/lib/zstd.c:1696–1705  ·  view source on GitHub ↗

! BIT_reloadDStreamFast() : * Similar to BIT_reloadDStream(), but with two differences: * 1. bitsConsumed <= sizeof(bitD->bitContainer)*8 must hold! * 2. Returns BIT_DStream_overflow when bitD->ptr < bitD->limitPtr, at this * point you must use BIT_reloadDStream() to reload. */

Source from the content-addressed store, hash-verified

1694 * point you must use BIT_reloadDStream() to reload.
1695 */
1696MEM_STATIC BIT_DStream_status BIT_reloadDStreamFast(BIT_DStream_t* bitD)
1697{
1698 if (UNLIKELY(bitD->ptr < bitD->limitPtr))
1699 return BIT_DStream_overflow;
1700 assert(bitD->bitsConsumed <= sizeof(bitD->bitContainer)*8);
1701 bitD->ptr -= bitD->bitsConsumed >> 3;
1702 bitD->bitsConsumed &= 7;
1703 bitD->bitContainer = MEM_readLEST(bitD->ptr);
1704 return BIT_DStream_unfinished;
1705}
1706
1707/*! BIT_reloadDStream() :
1708 * Refill `bitD` from buffer previously set in BIT_initDStream() .

Calls 1

MEM_readLESTFunction · 0.70

Tested by

no test coverage detected