/freebsd-12-stable/sys/contrib/zstd/lib/compress/ |
H A D | fse_compress.c | 85 size_t FSE_buildCTable_wksp(FSE_CTable* ct, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog, void* workSpace, size_t wkspSize) argument 111 if (normalizedCounter[u-1]==-1) { /* Low proba symbol */ 115 cumul[u] = cumul[u-1] + normalizedCounter[u-1]; 125 for (nbOccurences=0; nbOccurences<normalizedCounter[symbol]; nbOccurences++) { 144 switch (normalizedCounter[s]) 156 U32 const maxBitsOut = tableLog - BIT_highbit32 (normalizedCounter[s]-1); 157 U32 const minStatePlus = normalizedCounter[s] << maxBitsOut; 159 symbolTT[s].deltaFindState = total - normalizedCounter[s]; 160 total += normalizedCounter[s]; 167 size_t FSE_buildCTable(FSE_CTable* ct, const short* normalizedCounter, unsigne argument 186 FSE_writeNCount_generic(void* header, size_t headerBufferSize, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog, unsigned writeIsSafe) argument 274 FSE_writeNCount(void* buffer, size_t bufferSize, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog) argument 583 FSE_normalizeCount(short* normalizedCounter, unsigned tableLog, const unsigned* count, size_t total, unsigned maxSymbolValue) argument [all...] |
H A D | zstd_compress.c | 2240 static size_t ZSTD_checkDictNCount(short* normalizedCounter, unsigned dictMaxSymbolValue, unsigned maxSymbolValue) { argument 2244 if (normalizedCounter[s] == 0) return ERROR(dictionary_corrupted);
|
/freebsd-12-stable/sys/contrib/zstd/lib/common/ |
H A D | fse_decompress.c | 93 size_t FSE_buildDTable(FSE_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog) argument 114 if (normalizedCounter[s]==-1) { 118 if (normalizedCounter[s] >= largeLimit) DTableH.fastMode=0; 119 symbolNext[s] = normalizedCounter[s]; 130 for (i=0; i<normalizedCounter[s]; i++) { 135 if (position!=0) return ERROR(GENERIC); /* position must reach all cells once, otherwise normalizedCounter is incorrect */
|
H A D | fse.h | 167 'normalizedCounter' is a table of short, of minimum size (maxSymbolValue+1). 170 FSE_PUBLIC_API size_t FSE_normalizeCount(short* normalizedCounter, unsigned tableLog, const unsigned* count, size_t srcSize, unsigned maxSymbolValue); 178 Compactly save 'normalizedCounter' into 'buffer'. 181 FSE_PUBLIC_API size_t FSE_writeNCount (void* buffer, size_t bufferSize, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog); 193 FSE_PUBLIC_API size_t FSE_buildCTable(FSE_CTable* ct, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog); 221 called 'normalizedCounter', which is a table of signed short. 222 'normalizedCounter' must be already allocated, and have at least 'maxSymbolValue+1' cells. 227 'normalizedCounter' can be saved in a compact manner to a memory area using FSE_writeNCount(). 233 'normalizedCounter' can then be used to create the compression table 'CTable'. 249 Read compactly saved 'normalizedCounter' fro [all...] |
H A D | entropy_common.c | 61 size_t FSE_readNCount (short* normalizedCounter, unsigned* maxSVPtr, unsigned* tableLogPtr, argument 106 while (charnum < n0) normalizedCounter[charnum++] = 0; 128 normalizedCounter[charnum++] = (short)count;
|
/freebsd-12-stable/sys/contrib/zstd/lib/legacy/ |
H A D | zstd_v01.c | 400 (FSE_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog) 423 if (normalizedCounter[s]==-1) 430 if (normalizedCounter[s] >= largeLimit) noLarge=0; 431 symbolNext[s] = normalizedCounter[s]; 439 for (i=0; i<normalizedCounter[s]; i++) 447 if (position!=0) return (size_t)-FSE_ERROR_GENERIC; /* position must reach all cells once, otherwise normalizedCounter is incorrect */ 482 static size_t FSE_readNCount (short* normalizedCounter, unsigned* maxSVPtr, unsigned* tableLogPtr, argument 535 while (charnum < n0) normalizedCounter[charnum++] = 0; 563 normalizedCounter[charnum++] = count; 399 FSE_buildDTable(FSE_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog) argument
|
H A D | zstd_v03.c | 1086 (FSE_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog) 1109 if (normalizedCounter[s]==-1) 1116 if (normalizedCounter[s] >= largeLimit) noLarge=0; 1117 symbolNext[s] = normalizedCounter[s]; 1125 for (i=0; i<normalizedCounter[s]; i++) 1133 if (position!=0) return ERROR(GENERIC); /* position must reach all cells once, otherwise normalizedCounter is incorrect */ 1168 static size_t FSE_readNCount (short* normalizedCounter, unsigned* maxSVPtr, unsigned* tableLogPtr, argument 1221 while (charnum < n0) normalizedCounter[charnum++] = 0; 1249 normalizedCounter[charnum++] = count; 1085 FSE_buildDTable(FSE_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog) argument
|
H A D | zstd_v04.c | 528 Read compactly saved 'normalizedCounter' from 'rBuffer'. 532 static size_t FSE_readNCount (short* normalizedCounter, unsigned* maxSymbolValuePtr, unsigned* tableLogPtr, const void* rBuffer, size_t rBuffSize); 544 static size_t FSE_buildDTable ( FSE_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog); 563 'normalizedCounter' must be already allocated, and have at least 'maxSymbolValuePtr[0]+1' cells of signed short. 571 The next step is to build the decompression tables 'FSE_DTable' from 'normalizedCounter'. 1125 static size_t FSE_buildDTable(FSE_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog) argument 1148 if (normalizedCounter[s]==-1) 1155 if (normalizedCounter[s] >= largeLimit) noLarge=0; 1156 symbolNext[s] = normalizedCounter[s]; 1164 for (i=0; i<normalizedCounter[ 1207 FSE_readNCount(short* normalizedCounter, unsigned* maxSVPtr, unsigned* tableLogPtr, const void* headerBuffer, size_t hbSize) argument [all...] |
H A D | zstd_v05.c | 631 Read compactly saved 'normalizedCounter' from 'rBuffer'. 635 size_t FSEv05_readNCount (short* normalizedCounter, unsigned* maxSymbolValuePtr, unsigned* tableLogPtr, const void* rBuffer, size_t rBuffSize); 649 size_t FSEv05_buildDTable (FSEv05_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog); 1207 size_t FSEv05_buildDTable(FSEv05_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog) argument 1229 if (normalizedCounter[s]==-1) { 1233 if (normalizedCounter[s] >= largeLimit) noLarge=0; 1234 symbolNext[s] = normalizedCounter[s]; 1240 for (i=0; i<normalizedCounter[s]; i++) { 1246 if (position!=0) return ERROR(GENERIC); /* position must reach all cells once, otherwise normalizedCounter is incorrect */ 1279 size_t FSEv05_readNCount (short* normalizedCounter, unsigne argument [all...] |
H A D | zstd_v06.c | 703 Read compactly saved 'normalizedCounter' from 'rBuffer'. 707 size_t FSEv06_readNCount (short* normalizedCounter, unsigned* maxSymbolValuePtr, unsigned* tableLogPtr, const void* rBuffer, size_t rBuffSize); 718 size_t FSEv06_buildDTable (FSEv06_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog); 736 'normalizedCounter' must be already allocated, and have at least 'maxSymbolValuePtr[0]+1' cells of signed short. 744 The next step is to build the decompression tables 'FSEv06_DTable' from 'normalizedCounter'. 1263 size_t FSEv06_readNCount (short* normalizedCounter, unsigned* maxSVPtr, unsigned* tableLogPtr, argument 1308 while (charnum < n0) normalizedCounter[charnum++] = 0; 1331 normalizedCounter[charnum++] = count; 1458 size_t FSEv06_buildDTable(FSEv06_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog) argument 1479 if (normalizedCounter[ [all...] |
H A D | zstd_v07.c | 751 Read compactly saved 'normalizedCounter' from 'rBuffer'. 755 size_t FSEv07_readNCount (short* normalizedCounter, unsigned* maxSymbolValuePtr, unsigned* tableLogPtr, const void* rBuffer, size_t rBuffSize); 766 size_t FSEv07_buildDTable (FSEv07_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog); 784 'normalizedCounter' must be already allocated, and have at least 'maxSymbolValuePtr[0]+1' cells of signed short. 792 The next step is to build the decompression tables 'FSEv07_DTable' from 'normalizedCounter'. 1207 size_t FSEv07_readNCount (short* normalizedCounter, unsigned* maxSVPtr, unsigned* tableLogPtr, argument 1252 while (charnum < n0) normalizedCounter[charnum++] = 0; 1275 normalizedCounter[charnum++] = count; 1478 size_t FSEv07_buildDTable(FSEv07_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog) argument 1499 if (normalizedCounter[ [all...] |
H A D | zstd_v02.c | 1085 (FSE_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog) 1108 if (normalizedCounter[s]==-1) 1115 if (normalizedCounter[s] >= largeLimit) noLarge=0; 1116 symbolNext[s] = normalizedCounter[s]; 1124 for (i=0; i<normalizedCounter[s]; i++) 1132 if (position!=0) return ERROR(GENERIC); /* position must reach all cells once, otherwise normalizedCounter is incorrect */ 1167 static size_t FSE_readNCount (short* normalizedCounter, unsigned* maxSVPtr, unsigned* tableLogPtr, argument 1220 while (charnum < n0) normalizedCounter[charnum++] = 0; 1248 normalizedCounter[charnum++] = count; 1084 FSE_buildDTable(FSE_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog) argument
|
/freebsd-12-stable/sys/contrib/zstd/lib/decompress/ |
H A D | zstd_decompress.c | 805 const short* normalizedCounter, unsigned maxSymbolValue, 827 if (normalizedCounter[s]==-1) { 831 if (normalizedCounter[s] >= largeLimit) DTableH.fastMode=0; 832 symbolNext[s] = normalizedCounter[s]; 843 for (i=0; i<normalizedCounter[s]; i++) { 848 assert(position == 0); /* position must reach all cells once, otherwise normalizedCounter is incorrect */ 804 ZSTD_buildFSETable(ZSTD_seqSymbol* dt, const short* normalizedCounter, unsigned maxSymbolValue, const U32* baseValue, const U32* nbAdditionalBits, unsigned tableLog) argument
|