bitC 78 lib/zstd/bitstream.h ZSTD_STATIC size_t BIT_initCStream(BIT_CStream_t *bitC, void *dstBuffer, size_t dstCapacity); bitC 79 lib/zstd/bitstream.h ZSTD_STATIC void BIT_addBits(BIT_CStream_t *bitC, size_t value, unsigned nbBits); bitC 80 lib/zstd/bitstream.h ZSTD_STATIC void BIT_flushBits(BIT_CStream_t *bitC); bitC 81 lib/zstd/bitstream.h ZSTD_STATIC size_t BIT_closeCStream(BIT_CStream_t *bitC); bitC 136 lib/zstd/bitstream.h ZSTD_STATIC void BIT_addBitsFast(BIT_CStream_t *bitC, size_t value, unsigned nbBits); bitC 139 lib/zstd/bitstream.h ZSTD_STATIC void BIT_flushBitsFast(BIT_CStream_t *bitC); bitC 162 lib/zstd/bitstream.h ZSTD_STATIC size_t BIT_initCStream(BIT_CStream_t *bitC, void *startPtr, size_t dstCapacity) bitC 164 lib/zstd/bitstream.h bitC->bitContainer = 0; bitC 165 lib/zstd/bitstream.h bitC->bitPos = 0; bitC 166 lib/zstd/bitstream.h bitC->startPtr = (char *)startPtr; bitC 167 lib/zstd/bitstream.h bitC->ptr = bitC->startPtr; bitC 168 lib/zstd/bitstream.h bitC->endPtr = bitC->startPtr + dstCapacity - sizeof(bitC->ptr); bitC 169 lib/zstd/bitstream.h if (dstCapacity <= sizeof(bitC->ptr)) bitC 177 lib/zstd/bitstream.h ZSTD_STATIC void BIT_addBits(BIT_CStream_t *bitC, size_t value, unsigned nbBits) bitC 179 lib/zstd/bitstream.h bitC->bitContainer |= (value & BIT_mask[nbBits]) << bitC->bitPos; bitC 180 lib/zstd/bitstream.h bitC->bitPos += nbBits; bitC 185 lib/zstd/bitstream.h ZSTD_STATIC void BIT_addBitsFast(BIT_CStream_t *bitC, size_t value, unsigned nbBits) bitC 187 lib/zstd/bitstream.h bitC->bitContainer |= value << bitC->bitPos; bitC 188 lib/zstd/bitstream.h bitC->bitPos += nbBits; bitC 193 lib/zstd/bitstream.h ZSTD_STATIC void BIT_flushBitsFast(BIT_CStream_t *bitC) bitC 195 lib/zstd/bitstream.h size_t const nbBytes = bitC->bitPos >> 3; bitC 196 lib/zstd/bitstream.h ZSTD_writeLEST(bitC->ptr, bitC->bitContainer); bitC 197 lib/zstd/bitstream.h bitC->ptr += nbBytes; bitC 198 lib/zstd/bitstream.h bitC->bitPos &= 7; bitC 199 lib/zstd/bitstream.h bitC->bitContainer >>= nbBytes * 8; /* if bitPos >= sizeof(bitContainer)*8 --> undefined behavior */ bitC 205 lib/zstd/bitstream.h ZSTD_STATIC void BIT_flushBits(BIT_CStream_t *bitC) bitC 207 lib/zstd/bitstream.h size_t const nbBytes = bitC->bitPos >> 3; bitC 208 lib/zstd/bitstream.h ZSTD_writeLEST(bitC->ptr, bitC->bitContainer); bitC 209 lib/zstd/bitstream.h bitC->ptr += nbBytes; bitC 210 lib/zstd/bitstream.h if (bitC->ptr > bitC->endPtr) bitC 211 lib/zstd/bitstream.h bitC->ptr = bitC->endPtr; bitC 212 lib/zstd/bitstream.h bitC->bitPos &= 7; bitC 213 lib/zstd/bitstream.h bitC->bitContainer >>= nbBytes * 8; /* if bitPos >= sizeof(bitContainer)*8 --> undefined behavior */ bitC 219 lib/zstd/bitstream.h ZSTD_STATIC size_t BIT_closeCStream(BIT_CStream_t *bitC) bitC 221 lib/zstd/bitstream.h BIT_addBitsFast(bitC, 1, 1); /* endMark */ bitC 222 lib/zstd/bitstream.h BIT_flushBits(bitC); bitC 224 lib/zstd/bitstream.h if (bitC->ptr >= bitC->endPtr) bitC 227 lib/zstd/bitstream.h return (bitC->ptr - bitC->startPtr) + (bitC->bitPos > 0); bitC 303 lib/zstd/fse.h static void FSE_encodeSymbol(BIT_CStream_t *bitC, FSE_CState_t *CStatePtr, unsigned symbol); bitC 305 lib/zstd/fse.h static void FSE_flushCState(BIT_CStream_t *bitC, const FSE_CState_t *CStatePtr); bitC 453 lib/zstd/fse.h ZSTD_STATIC void FSE_encodeSymbol(BIT_CStream_t *bitC, FSE_CState_t *statePtr, U32 symbol) bitC 458 lib/zstd/fse.h BIT_addBits(bitC, statePtr->value, nbBitsOut); bitC 462 lib/zstd/fse.h ZSTD_STATIC void FSE_flushCState(BIT_CStream_t *bitC, const FSE_CState_t *statePtr) bitC 464 lib/zstd/fse.h BIT_addBits(bitC, statePtr->value, statePtr->stateLog); bitC 465 lib/zstd/fse.h BIT_flushBits(bitC); bitC 730 lib/zstd/fse_compress.c BIT_CStream_t bitC; bitC 737 lib/zstd/fse_compress.c size_t const initError = BIT_initCStream(&bitC, dst, dstSize); bitC 747 lib/zstd/fse_compress.c FSE_encodeSymbol(&bitC, &CState1, *--ip); bitC 748 lib/zstd/fse_compress.c FSE_FLUSHBITS(&bitC); bitC 756 lib/zstd/fse_compress.c if ((sizeof(bitC.bitContainer) * 8 > FSE_MAX_TABLELOG * 4 + 7) && (srcSize & 2)) { /* test bit 2 */ bitC 757 lib/zstd/fse_compress.c FSE_encodeSymbol(&bitC, &CState2, *--ip); bitC 758 lib/zstd/fse_compress.c FSE_encodeSymbol(&bitC, &CState1, *--ip); bitC 759 lib/zstd/fse_compress.c FSE_FLUSHBITS(&bitC); bitC 765 lib/zstd/fse_compress.c FSE_encodeSymbol(&bitC, &CState2, *--ip); bitC 767 lib/zstd/fse_compress.c if (sizeof(bitC.bitContainer) * 8 < FSE_MAX_TABLELOG * 2 + 7) /* this test must be static */ bitC 768 lib/zstd/fse_compress.c FSE_FLUSHBITS(&bitC); bitC 770 lib/zstd/fse_compress.c FSE_encodeSymbol(&bitC, &CState1, *--ip); bitC 772 lib/zstd/fse_compress.c if (sizeof(bitC.bitContainer) * 8 > FSE_MAX_TABLELOG * 4 + 7) { /* this test must be static */ bitC 773 lib/zstd/fse_compress.c FSE_encodeSymbol(&bitC, &CState2, *--ip); bitC 774 lib/zstd/fse_compress.c FSE_encodeSymbol(&bitC, &CState1, *--ip); bitC 777 lib/zstd/fse_compress.c FSE_FLUSHBITS(&bitC); bitC 780 lib/zstd/fse_compress.c FSE_flushCState(&bitC, &CState2); bitC 781 lib/zstd/fse_compress.c FSE_flushCState(&bitC, &CState1); bitC 782 lib/zstd/fse_compress.c return BIT_closeCStream(&bitC); bitC 545 lib/zstd/huf_compress.c BIT_CStream_t bitC; bitC 551 lib/zstd/huf_compress.c size_t const initErr = BIT_initCStream(&bitC, op, oend - op); bitC 558 lib/zstd/huf_compress.c case 3: HUF_encodeSymbol(&bitC, ip[n + 2], CTable); HUF_FLUSHBITS_2(&bitC); bitC 560 lib/zstd/huf_compress.c case 2: HUF_encodeSymbol(&bitC, ip[n + 1], CTable); HUF_FLUSHBITS_1(&bitC); bitC 562 lib/zstd/huf_compress.c case 1: HUF_encodeSymbol(&bitC, ip[n + 0], CTable); HUF_FLUSHBITS(&bitC); bitC 568 lib/zstd/huf_compress.c HUF_encodeSymbol(&bitC, ip[n - 1], CTable); bitC 569 lib/zstd/huf_compress.c HUF_FLUSHBITS_1(&bitC); bitC 570 lib/zstd/huf_compress.c HUF_encodeSymbol(&bitC, ip[n - 2], CTable); bitC 571 lib/zstd/huf_compress.c HUF_FLUSHBITS_2(&bitC); bitC 572 lib/zstd/huf_compress.c HUF_encodeSymbol(&bitC, ip[n - 3], CTable); bitC 573 lib/zstd/huf_compress.c HUF_FLUSHBITS_1(&bitC); bitC 574 lib/zstd/huf_compress.c HUF_encodeSymbol(&bitC, ip[n - 4], CTable); bitC 575 lib/zstd/huf_compress.c HUF_FLUSHBITS(&bitC); bitC 578 lib/zstd/huf_compress.c return BIT_closeCStream(&bitC);