! 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. */
| 1694 | * point you must use BIT_reloadDStream() to reload. |
| 1695 | */ |
| 1696 | MEM_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() . |
no test coverage detected