fix dict loading

This commit is contained in:
Yann Collet 2016-12-02 11:36:11 -08:00
parent 7fdbb1ed46
commit 2238312c2f
2 changed files with 5 additions and 2 deletions

3
NEWS
View File

@ -1,8 +1,9 @@
v1.1.2
Improved : faster decompression speed at ultra compression settings and in 32-bits mode
cli : new : preserve file attributes, by Przemyslaw Skibinski
cli : fixed : status displays total amount decoded when stream/file consists of multiple appended frames (like pzstd)
cli : fixed : status displays total amount decoded, even for file consisting of multiple frames (like pzstd)
API : changed : zbuff prototypes now generate deprecation warnings
Changed : reduced stack memory use
v1.1.1
New : command -M#, --memory=, --memlimit=, --memlimit-decompress= to limit allowed memory consumption

View File

@ -358,13 +358,15 @@ typedef struct { U16 sequence; BYTE nbBits; BYTE length; } HUF_DEltX4; /* doubl
typedef struct { BYTE symbol; BYTE weight; } sortedSymbol_t;
/* HUF_fillDTableX4Level2() :
* `rankValOrigin` must be a table of at least (HUF_TABLELOG_MAX + 1) U32 */
static void HUF_fillDTableX4Level2(HUF_DEltX4* DTable, U32 sizeLog, const U32 consumed,
const U32* rankValOrigin, const int minWeight,
const sortedSymbol_t* sortedSymbols, const U32 sortedListSize,
U32 nbBitsBaseline, U16 baseSeq)
{
HUF_DEltX4 DElt;
U32 rankVal[HUF_TABLELOG_ABSOLUTEMAX + 1];
U32 rankVal[HUF_TABLELOG_MAX + 1];
/* get pre-calculated rankVal */
memcpy(rankVal, rankValOrigin, sizeof(rankVal));