Lines Matching defs:max
70 static size_t ZSTD_NCountCost(unsigned const* count, unsigned const max,
75 const U32 tableLog = FSE_optimalTableLog(FSELog, nbSeq, max);
76 FORWARD_IF_ERROR(FSE_normalizeCount(norm, tableLog, count, nbSeq, max, ZSTD_useLowProbCount(nbSeq)), "");
77 return FSE_writeNCount(wksp, sizeof(wksp), norm, max, tableLog);
84 static size_t ZSTD_entropyCost(unsigned const* count, unsigned const max, size_t const total)
90 for (s = 0; s <= max; ++s) {
107 unsigned const max)
114 if (ZSTD_getFSEMaxSymbolValue(ctable) < max) {
116 ZSTD_getFSEMaxSymbolValue(ctable), max);
119 for (s = 0; s <= max; ++s) {
136 * table described by norm. The max symbol support by norm is assumed >= max.
140 unsigned const* count, unsigned const max)
146 for (s = 0; s <= max; ++s) {
158 FSE_repeat* repeatMode, unsigned const* count, unsigned const max,
206 size_t const basicCost = isDefaultAllowed ? ZSTD_crossEntropyCost(defaultNorm, defaultNormLog, count, max) : ERROR(GENERIC);
207 size_t const repeatCost = *repeatMode != FSE_repeat_none ? ZSTD_fseBitCost(prevCTable, count, max) : ERROR(GENERIC);
208 size_t const NCountCost = ZSTD_NCountCost(count, max, nbSeq, FSELog);
209 size_t const compressedCost = (NCountCost << 3) + ZSTD_entropyCost(count, max, nbSeq);
245 unsigned* count, U32 max,
257 FORWARD_IF_ERROR(FSE_buildCTable_rle(nextCTable, (BYTE)max), "");
270 const U32 tableLog = FSE_optimalTableLog(FSELog, nbSeq, max);
278 FORWARD_IF_ERROR(FSE_normalizeCount(wksp->norm, tableLog, count, nbSeq_1, max, ZSTD_useLowProbCount(nbSeq_1)), "FSE_normalizeCount failed");
280 { size_t const NCountSize = FSE_writeNCount(op, (size_t)(oend - op), wksp->norm, max, tableLog); /* overflow protected */
282 FORWARD_IF_ERROR(FSE_buildCTable_wksp(nextCTable, wksp->norm, max, tableLog, wksp->wksp, sizeof(wksp->wksp)), "FSE_buildCTable_wksp failed");