Lines Matching refs:nbSeq
57 static unsigned ZSTD_useLowProbCount(size_t const nbSeq) in ZSTD_useLowProbCount() argument
63 return nbSeq >= 2048; in ZSTD_useLowProbCount()
71 size_t const nbSeq, unsigned const FSELog) in ZSTD_NCountCost() argument
75 const U32 tableLog = FSE_optimalTableLog(FSELog, nbSeq, max); in ZSTD_NCountCost()
76 …RWARD_IF_ERROR(FSE_normalizeCount(norm, tableLog, count, nbSeq, max, ZSTD_useLowProbCount(nbSeq)),… in ZSTD_NCountCost()
157 size_t const mostFrequent, size_t nbSeq, unsigned const FSELog, in ZSTD_selectEncodingType() argument
164 if (mostFrequent == nbSeq) { in ZSTD_selectEncodingType()
166 if (isDefaultAllowed && nbSeq <= 2) { in ZSTD_selectEncodingType()
186 && (nbSeq < staticFse_nbSeq_max) ) { in ZSTD_selectEncodingType()
190 if ( (nbSeq < dynamicFse_nbSeq_min) in ZSTD_selectEncodingType()
191 || (mostFrequent < (nbSeq >> (defaultNormLog-1))) ) { in ZSTD_selectEncodingType()
206 size_t const NCountCost = ZSTD_NCountCost(count, max, nbSeq, FSELog); in ZSTD_selectEncodingType()
207 size_t const compressedCost = (NCountCost << 3) + ZSTD_entropyCost(count, max, nbSeq); in ZSTD_selectEncodingType()
244 const BYTE* codeTable, size_t nbSeq, in ZSTD_buildCTable() argument
267 size_t nbSeq_1 = nbSeq; in ZSTD_buildCTable()
268 const U32 tableLog = FSE_optimalTableLog(FSELog, nbSeq, max); in ZSTD_buildCTable()
269 if (count[codeTable[nbSeq-1]] > 1) { in ZSTD_buildCTable()
270 count[codeTable[nbSeq-1]]--; in ZSTD_buildCTable()
293 seqDef const* sequences, size_t nbSeq, int longOffsets) in ZSTD_encodeSequences_body() argument
308 FSE_initCState2(&stateMatchLength, CTable_MatchLength, mlCodeTable[nbSeq-1]); in ZSTD_encodeSequences_body()
309 FSE_initCState2(&stateOffsetBits, CTable_OffsetBits, ofCodeTable[nbSeq-1]); in ZSTD_encodeSequences_body()
310 FSE_initCState2(&stateLitLength, CTable_LitLength, llCodeTable[nbSeq-1]); in ZSTD_encodeSequences_body()
311 BIT_addBits(&blockStream, sequences[nbSeq-1].litLength, LL_bits[llCodeTable[nbSeq-1]]); in ZSTD_encodeSequences_body()
313 BIT_addBits(&blockStream, sequences[nbSeq-1].matchLength, ML_bits[mlCodeTable[nbSeq-1]]); in ZSTD_encodeSequences_body()
316 U32 const ofBits = ofCodeTable[nbSeq-1]; in ZSTD_encodeSequences_body()
319 BIT_addBits(&blockStream, sequences[nbSeq-1].offset, extraBits); in ZSTD_encodeSequences_body()
322 BIT_addBits(&blockStream, sequences[nbSeq-1].offset >> extraBits, in ZSTD_encodeSequences_body()
325 BIT_addBits(&blockStream, sequences[nbSeq-1].offset, ofCodeTable[nbSeq-1]); in ZSTD_encodeSequences_body()
330 for (n=nbSeq-2 ; n<nbSeq ; n--) { /* intentional underflow */ in ZSTD_encodeSequences_body()
387 seqDef const* sequences, size_t nbSeq, int longOffsets) in ZSTD_encodeSequences_default() argument
393 sequences, nbSeq, longOffsets); in ZSTD_encodeSequences_default()
405 seqDef const* sequences, size_t nbSeq, int longOffsets) in ZSTD_encodeSequences_bmi2() argument
411 sequences, nbSeq, longOffsets); in ZSTD_encodeSequences_bmi2()
421 seqDef const* sequences, size_t nbSeq, int longOffsets, int bmi2) in ZSTD_encodeSequences() argument
430 sequences, nbSeq, longOffsets); in ZSTD_encodeSequences()
438 sequences, nbSeq, longOffsets); in ZSTD_encodeSequences()