/freebsd/sys/contrib/openzfs/module/zstd/lib/common/ |
H A D | bitstream.h | 202 assert(nbBits < BIT_MASK_SIZE); in BIT_addBits() 205 bitC->bitPos += nbBits; in BIT_addBits() 214 assert((value>>nbBits) == 0); in BIT_addBitsFast() 217 bitC->bitPos += nbBits; in BIT_addBitsFast() 329 assert(nbBits < BIT_MASK_SIZE); in BIT_getMiddleBits() 335 assert(nbBits < BIT_MASK_SIZE); in BIT_getLowerBits() 364 assert(nbBits >= 1); in BIT_lookBitsFast() 370 bitD->bitsConsumed += nbBits; in BIT_skipBits() 380 BIT_skipBits(bitD, nbBits); in BIT_readBits() 389 assert(nbBits >= 1); in BIT_readBitsFast() [all …]
|
H A D | entropy_common.c | 47 int nbBits; in FSE_readNCount() local 71 nbBits = (bitStream & 0xF) + FSE_MIN_TABLELOG; /* extract tableLog */ in FSE_readNCount() 72 if (nbBits > FSE_TABLELOG_ABSOLUTE_MAX) return ERROR(tableLog_tooLarge); in FSE_readNCount() 75 *tableLogPtr = nbBits; in FSE_readNCount() 76 remaining = (1<<nbBits)+1; in FSE_readNCount() 77 threshold = 1<<nbBits; in FSE_readNCount() 78 nbBits++; in FSE_readNCount() 114 bitCount += nbBits-1; in FSE_readNCount() 118 bitCount += nbBits; in FSE_readNCount() 126 nbBits--; in FSE_readNCount()
|
H A D | fse.h | 317 size_t FSE_buildCTable_raw (FSE_CTable* ct, unsigned nbBits); 329 size_t FSE_buildDTable_raw (FSE_DTable* dt, unsigned nbBits); 574 unsigned char nbBits; member 595 U32 const nbBits = DInfo.nbBits; in FSE_updateState() local 596 size_t const lowBits = BIT_readBits(bitD, nbBits); in FSE_updateState() 603 U32 const nbBits = DInfo.nbBits; in FSE_decodeSymbol() local 605 size_t const lowBits = BIT_readBits(bitD, nbBits); in FSE_decodeSymbol() 616 U32 const nbBits = DInfo.nbBits; in FSE_decodeSymbolFast() local 618 size_t const lowBits = BIT_readBitsFast(bitD, nbBits); in FSE_decodeSymbolFast()
|
H A D | fse_decompress.c | 109 tableDecode[u].nbBits = (BYTE) (tableLog - BIT_highbit32(nextState) ); in FSE_buildDTable() 110 tableDecode[u].newState = (U16) ( (nextState << tableDecode[u].nbBits) - tableSize); in FSE_buildDTable() 134 cell->nbBits = 0; in FSE_buildDTable_rle() 140 size_t FSE_buildDTable_raw (FSE_DTable* dt, unsigned nbBits) in FSE_buildDTable_raw() argument 146 const unsigned tableSize = 1 << nbBits; in FSE_buildDTable_raw() 152 if (nbBits < 1) return ERROR(GENERIC); /* min size */ in FSE_buildDTable_raw() 155 DTableH->tableLog = (U16)nbBits; in FSE_buildDTable_raw() 160 dinfo[s].nbBits = (BYTE)nbBits; in FSE_buildDTable_raw()
|
/freebsd/sys/contrib/zstd/lib/common/ |
H A D | bitstream.h | 213 assert(nbBits < BIT_MASK_SIZE); in BIT_addBits() 216 bitC->bitPos += nbBits; in BIT_addBits() 225 assert((value>>nbBits) == 0); in BIT_addBitsFast() 228 bitC->bitPos += nbBits; in BIT_addBitsFast() 340 assert(nbBits < BIT_MASK_SIZE); in BIT_getMiddleBits() 358 assert(nbBits < BIT_MASK_SIZE); in BIT_getLowerBits() 388 assert(nbBits >= 1); in BIT_lookBitsFast() 394 bitD->bitsConsumed += nbBits; in BIT_skipBits() 404 BIT_skipBits(bitD, nbBits); in BIT_readBits() 413 assert(nbBits >= 1); in BIT_readBitsFast() [all …]
|
H A D | entropy_common.c | 76 int nbBits; in FSE_readNCount_body() local 100 nbBits = (bitStream & 0xF) + FSE_MIN_TABLELOG; /* extract tableLog */ in FSE_readNCount_body() 101 if (nbBits > FSE_TABLELOG_ABSOLUTE_MAX) return ERROR(tableLog_tooLarge); in FSE_readNCount_body() 104 *tableLogPtr = nbBits; in FSE_readNCount_body() 105 remaining = (1<<nbBits)+1; in FSE_readNCount_body() 106 threshold = 1<<nbBits; in FSE_readNCount_body() 107 nbBits++; in FSE_readNCount_body() 165 bitCount += nbBits-1; in FSE_readNCount_body() 169 bitCount += nbBits; in FSE_readNCount_body() 192 nbBits = BIT_highbit32(remaining) + 1; in FSE_readNCount_body() [all …]
|
H A D | fse.h | 330 size_t FSE_buildCTable_raw (FSE_CTable* ct, unsigned nbBits); 350 size_t FSE_buildDTable_raw (FSE_DTable* dt, unsigned nbBits); 600 unsigned char nbBits; member 621 U32 const nbBits = DInfo.nbBits; in FSE_updateState() local 622 size_t const lowBits = BIT_readBits(bitD, nbBits); in FSE_updateState() 629 U32 const nbBits = DInfo.nbBits; in FSE_decodeSymbol() local 631 size_t const lowBits = BIT_readBits(bitD, nbBits); in FSE_decodeSymbol() 642 U32 const nbBits = DInfo.nbBits; in FSE_decodeSymbolFast() local 644 size_t const lowBits = BIT_readBitsFast(bitD, nbBits); in FSE_decodeSymbolFast()
|
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()
|
/freebsd/sys/contrib/openzfs/module/zstd/lib/compress/ |
H A D | huf_compress.c | 108 BYTE nbBits; member 204 return table[symbolValue].nbBits; in HUF_getNbBits() 212 BYTE nbBits; member 279 huffNode[n+1].nbBits--; in HUF_setMaxHeight() 380 huffNode[nodeRoot].nbBits = 0; in HUF_buildCTable_wksp() 382 huffNode[n].nbBits = huffNode[ huffNode[n].parent ].nbBits + 1; in HUF_buildCTable_wksp() 384 huffNode[n].nbBits = huffNode[ huffNode[n].parent ].nbBits + 1; in HUF_buildCTable_wksp() 404 … tree[huffNode[n].byte].nbBits = huffNode[n].nbBits; /* push nbBits per symbol, symbol order */ in HUF_buildCTable_wksp() 424 size_t nbBits = 0; in HUF_estimateCompressedSize() local 427 nbBits += CTable[s].nbBits * count[s]; in HUF_estimateCompressedSize() [all …]
|
H A D | fse_compress.c | 200 int nbBits; in FSE_writeNCount_generic() local 217 nbBits = tableLog+1; in FSE_writeNCount_generic() 257 bitCount += nbBits; in FSE_writeNCount_generic() 261 while (remaining<threshold) { nbBits--; threshold>>=1; } in FSE_writeNCount_generic() 498 size_t FSE_buildCTable_raw (FSE_CTable* ct, unsigned nbBits) in FSE_buildCTable_raw() argument 500 const unsigned tableSize = 1 << nbBits; in FSE_buildCTable_raw() 510 if (nbBits < 1) return ERROR(GENERIC); /* min size */ in FSE_buildCTable_raw() 513 tableU16[-2] = (U16) nbBits; in FSE_buildCTable_raw() 521 { const U32 deltaNbBits = (nbBits << 16) - (1 << nbBits); in FSE_buildCTable_raw()
|
/freebsd/sys/contrib/zstd/lib/compress/ |
H A D | huf_compress.c | 154 *elt = nbBits; in HUF_setNbBits() 160 if (nbBits > 0) { in HUF_setValue() 161 assert((value >> nbBits) == 0); in HUF_setValue() 285 BYTE nbBits; member 637 huffNode[nodeRoot].nbBits = 0; in HUF_buildTree() 639 huffNode[n].nbBits = huffNode[ huffNode[n].parent ].nbBits + 1; in HUF_buildTree() 641 huffNode[n].nbBits = huffNode[ huffNode[n].parent ].nbBits + 1; in HUF_buildTree() 713 size_t nbBits = 0; in HUF_estimateCompressedSize() local 718 return nbBits >> 3; in HUF_estimateCompressedSize() 810 size_t const dirtyBits = nbBits == 0 ? 0 : BIT_highbit32((U32)nbBits) + 1; in HUF_addBits() [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()
|
/freebsd/sys/contrib/zstd/lib/legacy/ |
H A D | zstd_v02.c | 708 unsigned char nbBits; member 723 const U32 nbBits = DInfo.nbBits; in FSE_decodeSymbol() local 734 const U32 nbBits = DInfo.nbBits; in FSE_decodeSymbolFast() local 1184 int nbBits; in FSE_readNCount() local 1201 nbBits++; in FSE_readNCount() 1263 nbBits--; in FSE_readNCount() 1305 cell->nbBits = 0; in FSE_buildDTable_rle() 1331 dinfo[s].nbBits = (BYTE)nbBits; in FSE_buildDTable_raw() 1869 DElt.nbBits = (BYTE)(nbBits + consumed); in HUF_fillDTableX4Level2() 1906 HUF_fillDTableX4Level2(DTable+start, targetLog-nbBits, nbBits, in HUF_fillDTableX4() [all …]
|
H A D | zstd_v03.c | 710 unsigned char nbBits; member 725 const U32 nbBits = DInfo.nbBits; in FSE_decodeSymbol() local 736 const U32 nbBits = DInfo.nbBits; in FSE_decodeSymbolFast() local 1185 int nbBits; in FSE_readNCount() local 1202 nbBits++; in FSE_readNCount() 1264 nbBits--; in FSE_readNCount() 1306 cell->nbBits = 0; in FSE_buildDTable_rle() 1332 dinfo[s].nbBits = (BYTE)nbBits; in FSE_buildDTable_raw() 1866 DElt.nbBits = (BYTE)(nbBits + consumed); in HUF_fillDTableX4Level2() 1903 HUF_fillDTableX4Level2(DTable+start, targetLog-nbBits, nbBits, in HUF_fillDTableX4() [all …]
|
H A D | zstd_v01.c | 129 unsigned char nbBits; member 484 int nbBits; in FSE_readNCount() local 501 nbBits++; in FSE_readNCount() 563 nbBits--; in FSE_readNCount() 605 cell->nbBits = 0; in FSE_buildDTable_rle() 631 dinfo[s].nbBits = (BYTE)nbBits; in FSE_buildDTable_raw() 781 const U32 nbBits = DInfo.nbBits; in FSE_decodeSymbol() local 792 const U32 nbBits = DInfo.nbBits; in FSE_decodeSymbolFast() local 938 BYTE nbBits; member 945 BYTE nbBits; member [all …]
|
H A D | zstd_v04.c | 883 unsigned char nbBits; member 898 const U32 nbBits = DInfo.nbBits; in FSE_decodeSymbol() local 909 const U32 nbBits = DInfo.nbBits; in FSE_decodeSymbolFast() local 1162 int nbBits; in FSE_readNCount() local 1179 nbBits++; in FSE_readNCount() 1241 nbBits--; in FSE_readNCount() 1284 cell->nbBits = 0; in FSE_buildDTable_rle() 1311 dinfo[s].nbBits = (BYTE)nbBits; in FSE_buildDTable_raw() 2017 DElt.nbBits = (BYTE)(nbBits + consumed); in HUF_fillDTableX4Level2() 2054 HUF_fillDTableX4Level2(DTable+start, targetLog-nbBits, nbBits, in HUF_fillDTableX4() [all …]
|
H A D | zstd_v05.c | 999 unsigned char nbBits; member 1020 const U32 nbBits = DInfo.nbBits; in FSEv05_decodeSymbol() local 1031 const U32 nbBits = DInfo.nbBits; in FSEv05_decodeSymbolFast() local 1288 int nbBits; in FSEv05_readNCount() local 1305 nbBits++; in FSEv05_readNCount() 1354 nbBits--; in FSEv05_readNCount() 1392 cell->nbBits = 0; in FSEv05_buildDTable_rle() 1418 dinfo[s].nbBits = (BYTE)nbBits; in FSEv05_buildDTable_raw() 2143 DElt.nbBits = (BYTE)(nbBits + consumed); in HUFv05_fillDTableX4Level2() 2178 HUFv05_fillDTableX4Level2(DTable+start, targetLog-nbBits, nbBits, in HUFv05_fillDTableX4() [all …]
|
H A D | zstd_v06.c | 1126 U32 const nbBits = DInfo.nbBits; in FSEv06_updateState() local 1134 U32 const nbBits = DInfo.nbBits; in FSEv06_decodeSymbol() local 1147 U32 const nbBits = DInfo.nbBits; in FSEv06_decodeSymbolFast() local 1269 int nbBits; in FSEv06_readNCount() local 1286 nbBits++; in FSEv06_readNCount() 1334 nbBits--; in FSEv06_readNCount() 1535 cell->nbBits = 0; in FSEv06_buildDTable_rle() 1561 dinfo[s].nbBits = (BYTE)nbBits; in FSEv06_buildDTable_raw() 2275 DElt.nbBits = (BYTE)(nbBits + consumed); in HUFv06_fillDTableX4Level2() 2310 HUFv06_fillDTableX4Level2(DTable+start, targetLog-nbBits, nbBits, in HUFv06_fillDTableX4() [all …]
|
H A D | zstd_v07.c | 890 U32 const nbBits = DInfo.nbBits; in FSEv07_updateState() local 898 U32 const nbBits = DInfo.nbBits; in FSEv07_decodeSymbol() local 911 U32 const nbBits = DInfo.nbBits; in FSEv07_decodeSymbolFast() local 1213 int nbBits; in FSEv07_readNCount() local 1230 nbBits++; in FSEv07_readNCount() 1278 nbBits--; in FSEv07_readNCount() 1555 cell->nbBits = 0; in FSEv07_buildDTable_rle() 1581 dinfo[s].nbBits = (BYTE)nbBits; in FSEv07_buildDTable_raw() 2082 DElt.nbBits = (BYTE)(nbBits + consumed); in HUFv07_fillDTableX4Level2() 2117 HUFv07_fillDTableX4Level2(DTable+start, targetLog-nbBits, nbBits, in HUFv07_fillDTableX4() [all …]
|
/freebsd/sys/contrib/zstd/lib/decompress/ |
H A D | huf_decompress.c | 290 D4 = (symbol << 8) + nbBits; in HUF_DEltX1_set4() 292 D4 = symbol + (nbBits << 8); in HUF_DEltX1_set4() 429 D.nbBits = nbBits; in HUF_readDTableX1_wksp_bmi2() 438 D.nbBits = nbBits; in HUF_readDTableX1_wksp_bmi2() 485 BIT_skipBits(Dstream, dt[val].nbBits); in HUF_decodeSymbolX1() 879 U32 nbBits, U32 tableLog, in HUF_fillDTableX2ForWeight() argument 1005 U32 const nbBits = nbBitsBaseline - w; in HUF_fillDTableX2() local 1007 if (targetLog-nbBits >= minBits) { in HUF_fillDTableX2() 1011 int minWeight = nbBits + scaleLog; in HUF_fillDTableX2() 1030 nbBits, targetLog, in HUF_fillDTableX2() [all …]
|
H A D | zstd_decompress_block.c | 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 …D_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() 1186 U32 const llnbBits = llDInfo->nbBits; 1187 U32 const mlnbBits = mlDInfo->nbBits; 1188 U32 const ofnbBits = ofDInfo->nbBits;
|
H A D | zstd_decompress_internal.h | 70 BYTE nbBits; member
|
/freebsd/sys/contrib/openzfs/module/zstd/lib/decompress/ |
H A D | huf_decompress.c | 170 D.nbBits = (BYTE)(tableLog + 1 - w); in HUF_readDTableX1_wksp() 199 BIT_skipBits(Dstream, dt[val].nbBits); in HUF_decodeSymbolX1() 483 DElt.nbBits = (BYTE)(consumed); in HUF_fillDTableX2Level2() 500 DElt.nbBits = (BYTE)(nbBits + consumed); in HUF_fillDTableX2Level2() 525 const U32 nbBits = nbBitsBaseline - weight; in HUF_fillDTableX2() local 527 const U32 length = 1 << (targetLog-nbBits); in HUF_fillDTableX2() 531 int minWeight = nbBits + scaleLog; in HUF_fillDTableX2() 534 HUF_fillDTableX2Level2(DTable+start, targetLog-nbBits, nbBits, in HUF_fillDTableX2() 541 DElt.nbBits = (BYTE)(nbBits); in HUF_fillDTableX2() 664 BIT_skipBits(DStream, dt[val].nbBits); in HUF_decodeSymbolX2() [all …]
|
H A D | zstd_decompress_block.c | 355 cell->nbBits = 0; in ZSTD_buildSeqTable_rle() 421 tableDecode[u].nbBits = (BYTE) (tableLog - BIT_highbit32(nextState) ); in ZSTD_buildFSETable() 422 tableDecode[u].nextState = (U16) ( (nextState << tableDecode[u].nbBits) - tableSize); in ZSTD_buildFSETable() 447 U32 const nbBits = nbAdditionalBits[symbol]; in ZSTD_buildSeqTable() local 448 ZSTD_buildSeqTable_rle(DTableSpace, baseline, nbBits); in ZSTD_buildSeqTable() 807 U32 const nbBits = DInfo.nbBits; in ZSTD_updateFseState() local 808 size_t const lowBits = BIT_readBits(bitD, nbBits); in ZSTD_updateFseState() 815 U32 const nbBits = DInfo.nbBits; in ZSTD_updateFseStateWithDInfo() local 816 size_t const lowBits = BIT_readBits(bitD, nbBits); in ZSTD_updateFseStateWithDInfo()
|
H A D | zstd_decompress_internal.h | 70 BYTE nbBits; member
|