/kernel/linux/linux-6.6/lib/zstd/common/ |
H A D | bitstream.h | 57 MEM_STATIC void BIT_addBits(BIT_CStream_t* bitC, size_t value, unsigned nbBits); 97 MEM_STATIC size_t BIT_readBits(BIT_DStream_t* bitD, unsigned nbBits); 116 MEM_STATIC void BIT_addBitsFast(BIT_CStream_t* bitC, size_t value, unsigned nbBits); 117 /* faster, but works only if value is "clean", meaning all high bits above nbBits are 0 */ 122 MEM_STATIC size_t BIT_readBitsFast(BIT_DStream_t* bitD, unsigned nbBits); 123 /* faster, but works only if nbBits >= 1 */ 185 size_t value, unsigned nbBits) in BIT_addBits() 188 assert(nbBits < BIT_MASK_SIZE); in BIT_addBits() 189 assert(nbBits + bitC->bitPos < sizeof(bitC->bitContainer) * 8); in BIT_addBits() 190 bitC->bitContainer |= (value & BIT_mask[nbBits]) << bit in BIT_addBits() 184 BIT_addBits(BIT_CStream_t* bitC, size_t value, unsigned nbBits) BIT_addBits() argument 197 BIT_addBitsFast(BIT_CStream_t* bitC, size_t value, unsigned nbBits) BIT_addBitsFast() argument 311 BIT_getMiddleBits(size_t bitContainer, U32 const start, U32 const nbBits) BIT_getMiddleBits() argument 328 BIT_getLowerBits(size_t bitContainer, U32 const nbBits) BIT_getLowerBits() argument 356 BIT_lookBitsFast(const BIT_DStream_t* bitD, U32 nbBits) BIT_lookBitsFast() argument 363 BIT_skipBits(BIT_DStream_t* bitD, U32 nbBits) BIT_skipBits() argument 372 BIT_readBits(BIT_DStream_t* bitD, unsigned nbBits) BIT_readBits() argument 381 BIT_readBitsFast(BIT_DStream_t* bitD, unsigned nbBits) BIT_readBitsFast() argument [all...] |
H A D | entropy_common.c | 65 int nbBits; in FSE_readNCount_body() local 89 nbBits = (bitStream & 0xF) + FSE_MIN_TABLELOG; /* extract tableLog */ in FSE_readNCount_body() 90 if (nbBits > FSE_TABLELOG_ABSOLUTE_MAX) return ERROR(tableLog_tooLarge); in FSE_readNCount_body() 93 *tableLogPtr = nbBits; in FSE_readNCount_body() 94 remaining = (1<<nbBits)+1; in FSE_readNCount_body() 95 threshold = 1<<nbBits; in FSE_readNCount_body() 96 nbBits++; in FSE_readNCount_body() 154 bitCount += nbBits-1; in FSE_readNCount_body() 158 bitCount += nbBits; in FSE_readNCount_body() 181 nbBits in FSE_readNCount_body() [all...] |
H A D | fse.h | 327 size_t FSE_buildCTable_raw (FSE_CTable* ct, unsigned nbBits); 328 /*< build a fake FSE_CTable, designed for a flat distribution, where each symbol uses nbBits */ 347 size_t FSE_buildDTable_raw (FSE_DTable* dt, unsigned nbBits); 348 /*< build a fake FSE_DTable, designed to read a flat distribution where each symbol uses nbBits */ 412 Note : maximum allowed nbBits is 25, for compatibility with 32-bits decoders 413 BIT_addBits(&bitStream, bitField, nbBits); 470 Note : maximum allowed nbBits is 25, for 32-bits compatibility 471 size_t bitField = BIT_readBits(&DStream, nbBits); 500 /* faster, but works only if nbBits is always >= 1 (otherwise, result will be corrupted) */ 597 unsigned char nbBits; [all...] |
H A D | fse_decompress.c | 169 tableDecode[u].nbBits = (BYTE) (tableLog - BIT_highbit32(nextState) ); in FSE_buildDTable_internal() 170 tableDecode[u].newState = (U16) ( (nextState << tableDecode[u].nbBits) - tableSize); in FSE_buildDTable_internal() 199 cell->nbBits = 0; in FSE_buildDTable_rle() 205 size_t FSE_buildDTable_raw (FSE_DTable* dt, unsigned nbBits) in FSE_buildDTable_raw() argument 211 const unsigned tableSize = 1 << nbBits; in FSE_buildDTable_raw() 217 if (nbBits < 1) return ERROR(GENERIC); /* min size */ in FSE_buildDTable_raw() 220 DTableH->tableLog = (U16)nbBits; in FSE_buildDTable_raw() 225 dinfo[s].nbBits = (BYTE)nbBits; in FSE_buildDTable_raw()
|
/kernel/linux/linux-5.10/lib/zstd/ |
H A D | bitstream.h | 79 ZSTD_STATIC void BIT_addBits(BIT_CStream_t *bitC, size_t value, unsigned nbBits); 119 ZSTD_STATIC size_t BIT_readBits(BIT_DStream_t *bitD, unsigned nbBits); 136 ZSTD_STATIC void BIT_addBitsFast(BIT_CStream_t *bitC, size_t value, unsigned nbBits); 137 /* faster, but works only if value is "clean", meaning all high bits above nbBits are 0 */ 142 ZSTD_STATIC size_t BIT_readBitsFast(BIT_DStream_t *bitD, unsigned nbBits); 143 /* faster, but works only if nbBits >= 1 */ 177 ZSTD_STATIC void BIT_addBits(BIT_CStream_t *bitC, size_t value, unsigned nbBits) in BIT_addBits() argument 179 bitC->bitContainer |= (value & BIT_mask[nbBits]) << bitC->bitPos; in BIT_addBits() 180 bitC->bitPos += nbBits; in BIT_addBits() 184 * works only if `value` is _clean_, meaning all high bits above nbBits ar 185 BIT_addBitsFast(BIT_CStream_t *bitC, size_t value, unsigned nbBits) BIT_addBitsFast() argument 288 BIT_getMiddleBits(size_t bitContainer, U32 const start, U32 const nbBits) BIT_getMiddleBits() argument 290 BIT_getLowerBits(size_t bitContainer, U32 const nbBits) BIT_getLowerBits() argument 299 BIT_lookBits(const BIT_DStream_t *bitD, U32 nbBits) BIT_lookBits() argument 307 BIT_lookBitsFast(const BIT_DStream_t *bitD, U32 nbBits) BIT_lookBitsFast() argument 313 BIT_skipBits(BIT_DStream_t *bitD, U32 nbBits) BIT_skipBits() argument 320 BIT_readBits(BIT_DStream_t *bitD, U32 nbBits) BIT_readBits() argument 329 BIT_readBitsFast(BIT_DStream_t *bitD, U32 nbBits) BIT_readBitsFast() argument [all...] |
H A D | entropy_common.c | 64 int nbBits; in FSE_readNCount() local 75 nbBits = (bitStream & 0xF) + FSE_MIN_TABLELOG; /* extract tableLog */ in FSE_readNCount() 76 if (nbBits > FSE_TABLELOG_ABSOLUTE_MAX) in FSE_readNCount() 80 *tableLogPtr = nbBits; in FSE_readNCount() 81 remaining = (1 << nbBits) + 1; in FSE_readNCount() 82 threshold = 1 << nbBits; in FSE_readNCount() 83 nbBits++; in FSE_readNCount() 123 bitCount += nbBits - 1; in FSE_readNCount() 128 bitCount += nbBits; in FSE_readNCount() 136 nbBits in FSE_readNCount() [all...] |
H A D | huf_compress.c | 146 BYTE nbBits; member 180 huffWeight[n] = bitsToWeight[CTable[n].nbBits]; in HUF_writeCTable_wksp() 243 /* fill nbBits */ in HUF_readCTable_wksp() 248 CTable[n].nbBits = (BYTE)(tableLog + 1 - w); in HUF_readCTable_wksp() 259 nbPerRank[CTable[n].nbBits]++; in HUF_readCTable_wksp() 276 CTable[n].val = valPerRank[CTable[n].nbBits]++; in HUF_readCTable_wksp() 287 BYTE nbBits; member 292 const U32 largestBits = huffNode[lastNonNull].nbBits; in HUF_setMaxHeight() 302 while (huffNode[n].nbBits > maxNbBits) { in HUF_setMaxHeight() 303 totalCost += baseCost - (1 << (largestBits - huffNode[n].nbBits)); in HUF_setMaxHeight() 503 size_t nbBits = 0; HUF_estimateCompressedSize() local [all...] |
H A D | fse.h | 266 size_t FSE_buildCTable_raw(FSE_CTable *ct, unsigned nbBits); 267 /**< build a fake FSE_CTable, designed for a flat distribution, where each symbol uses nbBits */ 278 size_t FSE_buildDTable_raw(FSE_DTable *dt, unsigned nbBits); 279 /**< build a fake FSE_DTable, designed to read a flat distribution where each symbol uses nbBits */ 332 Note : maximum allowed nbBits is 25, for compatibility with 32-bits decoders 333 BIT_addBits(&bitStream, bitField, nbBits); 388 Note : maximum allowed nbBits is 25, for 32-bits compatibility 389 size_t bitField = BIT_readBits(&DStream, nbBits); 417 /* faster, but works only if nbBits is always >= 1 (otherwise, result will be corrupted) */ 478 unsigned char nbBits; member 499 U32 const nbBits = DInfo.nbBits; FSE_updateState() local 507 U32 const nbBits = DInfo.nbBits; FSE_decodeSymbol() local 520 U32 const nbBits = DInfo.nbBits; FSE_decodeSymbolFast() local [all...] |
H A D | fse_decompress.c | 152 tableDecode[u].nbBits = (BYTE)(tableLog - BIT_highbit32((U32)nextState)); in FSE_buildDTable_wksp() 153 tableDecode[u].newState = (U16)((nextState << tableDecode[u].nbBits) - tableSize); in FSE_buildDTable_wksp() 175 cell->nbBits = 0; in FSE_buildDTable_rle() 180 size_t FSE_buildDTable_raw(FSE_DTable *dt, unsigned nbBits) in FSE_buildDTable_raw() argument 186 const unsigned tableSize = 1 << nbBits; in FSE_buildDTable_raw() 192 if (nbBits < 1) in FSE_buildDTable_raw() 196 DTableH->tableLog = (U16)nbBits; in FSE_buildDTable_raw() 201 dinfo[s].nbBits = (BYTE)nbBits; in FSE_buildDTable_raw()
|
H A D | huf_decompress.c | 87 BYTE nbBits; member 148 D.nbBits = (BYTE)(tableLog + 1 - w); in HUF_readDTableX2_wksp() 162 BIT_skipBits(Dstream, dt[val].nbBits); in HUF_decodeSymbolX2() 383 BYTE nbBits; member 407 DElt.nbBits = (BYTE)(consumed); in HUF_fillDTableX4Level2() 419 const U32 nbBits = nbBitsBaseline - weight; in HUF_fillDTableX4Level2() local 420 const U32 length = 1 << (sizeLog - nbBits); in HUF_fillDTableX4Level2() 426 DElt.nbBits = (BYTE)(nbBits + consumed); in HUF_fillDTableX4Level2() 454 const U32 nbBits in HUF_fillDTableX4() local [all...] |
H A D | fse_compress.c | 209 int nbBits; in FSE_writeNCount_generic() local 227 nbBits = tableLog + 1; in FSE_writeNCount_generic() 269 bitCount += nbBits; in FSE_writeNCount_generic() 275 nbBits--, threshold >>= 1; in FSE_writeNCount_generic() 666 size_t FSE_buildCTable_raw(FSE_CTable *ct, unsigned nbBits) in FSE_buildCTable_raw() argument 668 const unsigned tableSize = 1 << nbBits; in FSE_buildCTable_raw() 678 if (nbBits < 1) in FSE_buildCTable_raw() 682 tableU16[-2] = (U16)nbBits; in FSE_buildCTable_raw() 691 const U32 deltaNbBits = (nbBits << 16) - (1 << nbBits); in FSE_buildCTable_raw() [all...] |
/kernel/linux/linux-6.6/lib/zstd/compress/ |
H A D | huf_compress.c | 148 static void HUF_setNbBits(HUF_CElt* elt, size_t nbBits) in HUF_setNbBits() argument 150 assert(nbBits <= HUF_TABLELOG_ABSOLUTEMAX); in HUF_setNbBits() 151 *elt = nbBits; in HUF_setNbBits() 156 size_t const nbBits = HUF_getNbBits(*elt); in HUF_setValue() local 157 if (nbBits > 0) { in HUF_setValue() 158 assert((value >> nbBits) == 0); in HUF_setValue() 159 *elt |= value << (sizeof(HUF_CElt) * 8 - nbBits); in HUF_setValue() 244 /* fill nbBits */ in HUF_readCTable() 282 BYTE nbBits; member 289 * It sets all nodes with nbBits > maxNbBit 710 size_t nbBits = 0; HUF_estimateCompressedSize() local 806 size_t const nbBits = HUF_getNbBits(elt); HUF_addBits() local 847 size_t const nbBits = bitC->bitPos[0] & 0xFF; HUF_flushBits() local 885 size_t const nbBits = bitC->bitPos[0] & 0xFF; HUF_closeCStream() local [all...] |
H A D | fse_compress.c | 240 int nbBits; in FSE_writeNCount_generic() local 257 nbBits = tableLog+1; in FSE_writeNCount_generic() 297 bitCount += nbBits; in FSE_writeNCount_generic() 301 while (remaining<threshold) { nbBits--; threshold>>=1; } in FSE_writeNCount_generic() 537 size_t FSE_buildCTable_raw (FSE_CTable* ct, unsigned nbBits) in FSE_buildCTable_raw() argument 539 const unsigned tableSize = 1 << nbBits; in FSE_buildCTable_raw() 549 if (nbBits < 1) return ERROR(GENERIC); /* min size */ in FSE_buildCTable_raw() 552 tableU16[-2] = (U16) nbBits; in FSE_buildCTable_raw() 560 { const U32 deltaNbBits = (nbBits << 16) - (1 << nbBits); in FSE_buildCTable_raw() [all...] |
/kernel/linux/linux-6.6/lib/zstd/decompress/ |
H A D | huf_decompress.c | 277 typedef struct { BYTE nbBits; BYTE byte; } HUF_DEltX1; /* single-symbol decoding */ member 283 static U64 HUF_DEltX1_set4(BYTE symbol, BYTE nbBits) { in HUF_DEltX1_set4() argument 286 D4 = (symbol << 8) + nbBits; in HUF_DEltX1_set4() 288 D4 = symbol + (nbBits << 8); in HUF_DEltX1_set4() 417 BYTE const nbBits = (BYTE)(tableLog + 1 - w); in HUF_readDTableX1_wksp_bmi2() local 425 D.nbBits = nbBits; in HUF_readDTableX1_wksp_bmi2() 434 D.nbBits = nbBits; in HUF_readDTableX1_wksp_bmi2() 442 U64 const D4 = HUF_DEltX1_set4(wksp->symbols[symbol + s], nbBits); in HUF_readDTableX1_wksp_bmi2() 815 typedef struct { U16 sequence; BYTE nbBits; BYTE length; } HUF_DEltX2; /* double-symbols decoding */ global() member 823 HUF_buildDEltX2U32(U32 symbol, U32 nbBits, U32 baseSeq, int level) HUF_buildDEltX2U32() argument 842 HUF_buildDEltX2(U32 symbol, U32 nbBits, U32 baseSeq, int level) HUF_buildDEltX2() argument 854 HUF_buildDEltX2U64(U32 symbol, U32 nbBits, U16 baseSeq, int level) HUF_buildDEltX2U64() argument 872 HUF_fillDTableX2ForWeight( HUF_DEltX2* DTableRank, sortedSymbol_t const* begin, sortedSymbol_t const* end, U32 nbBits, U32 tableLog, U16 baseSeq, int const level) HUF_fillDTableX2ForWeight() argument 975 U32 const nbBits = nbBitsBaseline - w; HUF_fillDTableX2Level2() local 1001 U32 const nbBits = nbBitsBaseline - w; HUF_fillDTableX2() local [all...] |
H A D | zstd_decompress_block.c | 325 /* nextState, nbAddBits, nbBits, baseVal */ 363 /* nextState, nbAddBits, nbBits, baseVal */ 386 /* nextState, nbAddBits, nbBits, baseVal */ 431 cell->nbBits = 0; in ZSTD_buildSeqTable_rle() 554 tableDecode[u].nbBits = (BYTE) (tableLog - BIT_highbit32(nextState) ); in ZSTD_buildFSETable_body() 555 tableDecode[u].nextState = (U16) ( (nextState << tableDecode[u].nbBits) - tableSize); in ZSTD_buildFSETable_body() 620 U8 const nbBits = nbAdditionalBits[symbol]; in ZSTD_buildSeqTable() local 621 ZSTD_buildSeqTable_rle(DTableSpace, baseline, nbBits); in ZSTD_buildSeqTable() 1150 ZSTD_updateFseStateWithDInfo(ZSTD_fseState* DStatePtr, BIT_DStream_t* bitD, U16 nextState, U32 nbBits) in ZSTD_updateFseStateWithDInfo() argument 1152 size_t const lowBits = BIT_readBits(bitD, nbBits); in ZSTD_updateFseStateWithDInfo() [all...] |
H A D | zstd_decompress_internal.h | 70 BYTE nbBits; member
|