opt: init statistics from dictionary

instead of starting from fake "default" statistics.
This commit is contained in:
Yann Collet
2018-05-10 17:59:12 -07:00
parent 74b1c75d64
commit 1a26ec6e8d
4 changed files with 87 additions and 23 deletions
+5
View File
@@ -143,6 +143,11 @@ size_t FSE_readNCount (short* normalizedCounter, unsigned* maxSVPtr, unsigned* t
} } /* while ((remaining>1) & (charnum<=*maxSVPtr)) */
if (remaining != 1) return ERROR(corruption_detected);
if (bitCount > 32) return ERROR(corruption_detected);
/* zeroise the rest */
{ unsigned symbNb = charnum;
for (symbNb=charnum; symbNb <= *maxSVPtr; symbNb++)
normalizedCounter[symbNb] = 0;
}
*maxSVPtr = charnum-1;
ip += (bitCount+7)>>3;