Home
last modified time | relevance | path

Searched refs:bitC (Results 1 – 4 of 4) sorted by relevance

/Linux-v6.6/lib/zstd/common/
Dbitstream.h56 MEM_STATIC size_t BIT_initCStream(BIT_CStream_t* bitC, void* dstBuffer, size_t dstCapacity);
57 MEM_STATIC void BIT_addBits(BIT_CStream_t* bitC, size_t value, unsigned nbBits);
58 MEM_STATIC void BIT_flushBits(BIT_CStream_t* bitC);
59 MEM_STATIC size_t BIT_closeCStream(BIT_CStream_t* bitC);
116 MEM_STATIC void BIT_addBitsFast(BIT_CStream_t* bitC, size_t value, unsigned nbBits);
119 MEM_STATIC void BIT_flushBitsFast(BIT_CStream_t* bitC);
169 MEM_STATIC size_t BIT_initCStream(BIT_CStream_t* bitC, in BIT_initCStream() argument
172 bitC->bitContainer = 0; in BIT_initCStream()
173 bitC->bitPos = 0; in BIT_initCStream()
174 bitC->startPtr = (char*)startPtr; in BIT_initCStream()
[all …]
Dfse.h383 static void FSE_encodeSymbol(BIT_CStream_t* bitC, FSE_CState_t* CStatePtr, unsigned symbol);
385 static void FSE_flushCState(BIT_CStream_t* bitC, const FSE_CState_t* CStatePtr);
537 MEM_STATIC void FSE_encodeSymbol(BIT_CStream_t* bitC, FSE_CState_t* statePtr, unsigned symbol) in FSE_encodeSymbol() argument
542 BIT_addBits(bitC, statePtr->value, nbBitsOut); in FSE_encodeSymbol()
546 MEM_STATIC void FSE_flushCState(BIT_CStream_t* bitC, const FSE_CState_t* statePtr) in FSE_flushCState() argument
548 BIT_addBits(bitC, statePtr->value, statePtr->stateLog); in FSE_flushCState()
549 BIT_flushBits(bitC); in FSE_flushCState()
/Linux-v6.6/lib/zstd/compress/
Dhuf_compress.c763 static size_t HUF_initCStream(HUF_CStream_t* bitC, in HUF_initCStream() argument
766 ZSTD_memset(bitC, 0, sizeof(*bitC)); in HUF_initCStream()
767 bitC->startPtr = (BYTE*)startPtr; in HUF_initCStream()
768 bitC->ptr = bitC->startPtr; in HUF_initCStream()
769 bitC->endPtr = bitC->startPtr + dstCapacity - sizeof(bitC->bitContainer[0]); in HUF_initCStream()
770 if (dstCapacity <= sizeof(bitC->bitContainer[0])) return ERROR(dstSize_tooSmall); in HUF_initCStream()
784 FORCE_INLINE_TEMPLATE void HUF_addBits(HUF_CStream_t* bitC, HUF_CElt elt, int idx, int kFast) in HUF_addBits() argument
793 bitC->bitContainer[idx] >>= HUF_getNbBits(elt); in HUF_addBits()
794 bitC->bitContainer[idx] |= kFast ? HUF_getValueFast(elt) : HUF_getValue(elt); in HUF_addBits()
798 bitC->bitPos[idx] += HUF_getNbBitsFast(elt); in HUF_addBits()
[all …]
Dfse_compress.c601 BIT_CStream_t bitC; in FSE_compress_usingCTable_generic() local
606 { size_t const initError = BIT_initCStream(&bitC, dst, dstSize); in FSE_compress_usingCTable_generic()
614 FSE_encodeSymbol(&bitC, &CState1, *--ip); in FSE_compress_usingCTable_generic()
615 FSE_FLUSHBITS(&bitC); in FSE_compress_usingCTable_generic()
623 if ((sizeof(bitC.bitContainer)*8 > FSE_MAX_TABLELOG*4+7 ) && (srcSize & 2)) { /* test bit 2 */ in FSE_compress_usingCTable_generic()
624 FSE_encodeSymbol(&bitC, &CState2, *--ip); in FSE_compress_usingCTable_generic()
625 FSE_encodeSymbol(&bitC, &CState1, *--ip); in FSE_compress_usingCTable_generic()
626 FSE_FLUSHBITS(&bitC); in FSE_compress_usingCTable_generic()
632 FSE_encodeSymbol(&bitC, &CState2, *--ip); in FSE_compress_usingCTable_generic()
634 if (sizeof(bitC.bitContainer)*8 < FSE_MAX_TABLELOG*2+7 ) /* this test must be static */ in FSE_compress_usingCTable_generic()
[all …]