| /freebsd-12-stable/sys/contrib/zstd/lib/compress/ |
| D | fse_compress.c | 85 size_t FSE_buildCTable_wksp(FSE_CTable* ct, const short* normalizedCounter, unsigned maxSymbolValue… in FSE_buildCTable_wksp() argument 102 tableU16[-1] = (U16) maxSymbolValue; in FSE_buildCTable_wksp() 110 for (u=1; u<=maxSymbolValue+1; u++) { in FSE_buildCTable_wksp() 117 cumul[maxSymbolValue+1] = tableSize+1; in FSE_buildCTable_wksp() 123 for (symbol=0; symbol<=maxSymbolValue; symbol++) { in FSE_buildCTable_wksp() 143 for (s=0; s<=maxSymbolValue; s++) { in FSE_buildCTable_wksp() 167 size_t FSE_buildCTable(FSE_CTable* ct, const short* normalizedCounter, unsigned maxSymbolValue, uns… in FSE_buildCTable() argument 170 …return FSE_buildCTable_wksp(ct, normalizedCounter, maxSymbolValue, tableLog, tableSymbol, sizeof(t… in FSE_buildCTable() 180 size_t FSE_NCountWriteBound(unsigned maxSymbolValue, unsigned tableLog) in FSE_NCountWriteBound() argument 182 size_t const maxHeaderSize = (((maxSymbolValue+1) * tableLog) >> 3) + 3; in FSE_NCountWriteBound() [all …]
|
| D | huf_compress.c | 69 unsigned HUF_optimalTableLog(unsigned maxTableLog, size_t srcSize, unsigned maxSymbolValue) in HUF_optimalTableLog() argument 71 return FSE_optimalTableLog_internal(maxTableLog, srcSize, maxSymbolValue, 1); in HUF_optimalTableLog() 90 U32 maxSymbolValue = HUF_TABLELOG_MAX; in HUF_compressWeights() local 103 { CHECK_V_F(maxCount, FSE_count_simple(count, &maxSymbolValue, weightTable, wtSize) ); in HUF_compressWeights() 108 tableLog = FSE_optimalTableLog(tableLog, wtSize, maxSymbolValue); in HUF_compressWeights() 109 CHECK_F( FSE_normalizeCount(norm, tableLog, count, wtSize, maxSymbolValue) ); in HUF_compressWeights() 112 { CHECK_V_F(hSize, FSE_writeNCount(op, oend-op, norm, maxSymbolValue, tableLog) ); in HUF_compressWeights() 117 …CHECK_F( FSE_buildCTable_wksp(CTable, norm, maxSymbolValue, tableLog, scratchBuffer, sizeof(scratc… in HUF_compressWeights() 136 const HUF_CElt* CTable, U32 maxSymbolValue, U32 huffLog) in HUF_writeCTable() argument 144 if (maxSymbolValue > HUF_SYMBOLVALUE_MAX) return ERROR(maxSymbolValue_tooLarge); in HUF_writeCTable() [all …]
|
| D | zstd_compress.c | 2240 …D_checkDictNCount(short* normalizedCounter, unsigned dictMaxSymbolValue, unsigned maxSymbolValue) { in ZSTD_checkDictNCount() argument 2242 if (dictMaxSymbolValue < maxSymbolValue) return ERROR(dictionary_corrupted); in ZSTD_checkDictNCount() 2243 for (s = 0; s <= maxSymbolValue; ++s) { in ZSTD_checkDictNCount() 2273 { unsigned maxSymbolValue = 255; in ZSTD_loadZstdDictionary() local 2274 …st hufHeaderSize = HUF_readCTable((HUF_CElt*)bs->entropy.hufCTable, &maxSymbolValue, dictPtr, dict… in ZSTD_loadZstdDictionary() 2276 if (maxSymbolValue < 255) return ERROR(dictionary_corrupted); in ZSTD_loadZstdDictionary()
|
| /freebsd-12-stable/sys/contrib/zstd/lib/common/ |
| D | huf.h | 108 unsigned maxSymbolValue, unsigned tableLog); 117 unsigned maxSymbolValue, unsigned tableLog, 156 #define HUF_CTABLE_SIZE_U32(maxSymbolValue) ((maxSymbolValue)+1) /* Use tables of U32, for prop… argument 157 #define HUF_CTABLE_SIZE(maxSymbolValue) (HUF_CTABLE_SIZE_U32(maxSymbolValue) * sizeof(U32)) argument 158 #define HUF_CREATE_STATIC_CTABLE(name, maxSymbolValue) \ argument 159 U32 name##hb[HUF_CTABLE_SIZE_U32(maxSymbolValue)]; \ 202 unsigned HUF_optimalTableLog(unsigned maxTableLog, size_t srcSize, unsigned maxSymbolValue); 204 size_t HUF_buildCTable (HUF_CElt* CTable, const unsigned* count, unsigned maxSymbolValue, unsigned … 205 …able (void* dst, size_t maxDstSize, const HUF_CElt* CTable, unsigned maxSymbolValue, unsigned huff… 220 unsigned maxSymbolValue, unsigned tableLog, [all …]
|
| D | fse.h | 124 …void* dst, size_t dstSize, const void* src, size_t srcSize, unsigned maxSymbolValue, unsigned tabl… 163 …IC_API unsigned FSE_optimalTableLog(unsigned maxTableLog, size_t srcSize, unsigned maxSymbolValue); 170 …malizedCounter, unsigned tableLog, const unsigned* count, size_t srcSize, unsigned maxSymbolValue); 175 FSE_PUBLIC_API size_t FSE_NCountWriteBound(unsigned maxSymbolValue, unsigned tableLog); 181 … buffer, size_t bufferSize, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tabl… 187 FSE_PUBLIC_API FSE_CTable* FSE_createCTable (unsigned maxSymbolValue, unsigned tableLog); 193 …buildCTable(FSE_CTable* ct, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tabl… 264 …uildDTable (FSE_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tabl… 319 #define FSE_CTABLE_SIZE_U32(maxTableLog, maxSymbolValue) (1 + (1<<(maxTableLog-1)) + ((maxSymbolV… argument 323 #define FSE_CTABLE_SIZE(maxTableLog, maxSymbolValue) (FSE_CTABLE_SIZE_U32(maxTableLog, maxSymbolV… argument [all …]
|
| D | fse_decompress.c | 93 size_t FSE_buildDTable(FSE_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, uns… in FSE_buildDTable() argument 99 U32 const maxSV1 = maxSymbolValue + 1; in FSE_buildDTable() 104 if (maxSymbolValue > FSE_MAX_SYMBOL_VALUE) return ERROR(maxSymbolValue_tooLarge); in FSE_buildDTable() 283 unsigned maxSymbolValue = FSE_MAX_SYMBOL_VALUE; in FSE_decompress_wksp() local 286 …size_t const NCountLength = FSE_readNCount (counting, &maxSymbolValue, &tableLog, istart, cSrcSize… in FSE_decompress_wksp() 293 CHECK_F( FSE_buildDTable (workSpace, counting, maxSymbolValue, tableLog) ); in FSE_decompress_wksp()
|
| /freebsd-12-stable/sys/contrib/zstd/tests/ |
| D | decodecorpus.c | 435 U32 maxSymbolValue = 255; in writeHufHeader() local 440 …{ size_t const largest = FSE_count_wksp (count, &maxSymbolValue, (const BYTE*)src, srcSize, WKSP… in writeHufHeader() 447 huffLog = RAND_range(seed, ZSTD_highbit32(maxSymbolValue)+1, huffLog+1); in writeHufHeader() 449 …{ size_t const maxBits = HUF_buildCTable_wksp (hufTable, count, maxSymbolValue, huffLog, WKSP, s… in writeHufHeader() 455 { size_t const hSize = HUF_writeCTable (op, dstSize, hufTable, maxSymbolValue, huffLog); in writeHufHeader() 773 static void initSymbolSet(const BYTE* symbols, size_t len, BYTE* set, BYTE maxSymbolValue) in initSymbolSet() argument 777 memset(set, 0, (size_t)maxSymbolValue+1); in initSymbolSet() 784 static int isSymbolSubset(const BYTE* symbols, size_t len, const BYTE* set, BYTE maxSymbolValue) in isSymbolSubset() argument 789 if (symbols[i] > maxSymbolValue || !set[symbols[i]]) { in isSymbolSubset()
|
| /freebsd-12-stable/sys/contrib/zstd/lib/legacy/ |
| D | zstd_v01.c | 400 (FSE_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog) in FSE_buildDTable() argument 416 if (maxSymbolValue > FSE_MAX_SYMBOL_VALUE) return (size_t)-FSE_ERROR_maxSymbolValue_tooLarge; in FSE_buildDTable() 421 for (s=0; s<=maxSymbolValue; s++) in FSE_buildDTable() 436 for (s=0; s<=maxSymbolValue; s++) in FSE_buildDTable() 622 const unsigned maxSymbolValue = tableMask; in FSE_buildDTable_raw() local 631 for (s=0; s<=maxSymbolValue; s++) in FSE_buildDTable_raw() 902 unsigned maxSymbolValue = FSE_MAX_SYMBOL_VALUE; in FSE_decompress() local 908 errorCode = FSE_readNCount (counting, &maxSymbolValue, &tableLog, istart, cSrcSize); in FSE_decompress() 914 errorCode = FSE_buildDTable (dt, counting, maxSymbolValue, tableLog); in FSE_decompress()
|
| D | zstd_v03.c | 646 #define FSE_CTABLE_SIZE_U32(maxTableLog, maxSymbolValue) (1 + (1<<(maxTableLog-1)) + ((maxSymbolV… argument 1086 (FSE_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog) in FSE_buildDTable() argument 1102 if (maxSymbolValue > FSE_MAX_SYMBOL_VALUE) return ERROR(maxSymbolValue_tooLarge); in FSE_buildDTable() 1107 for (s=0; s<=maxSymbolValue; s++) in FSE_buildDTable() 1122 for (s=0; s<=maxSymbolValue; s++) in FSE_buildDTable() 1308 const unsigned maxSymbolValue = tableMask; in FSE_buildDTable_raw() local 1317 for (s=0; s<=maxSymbolValue; s++) in FSE_buildDTable_raw() 1417 unsigned maxSymbolValue = FSE_MAX_SYMBOL_VALUE; in FSE_decompress() local 1423 errorCode = FSE_readNCount (counting, &maxSymbolValue, &tableLog, istart, cSrcSize); in FSE_decompress() 1429 errorCode = FSE_buildDTable (dt, counting, maxSymbolValue, tableLog); in FSE_decompress()
|
| D | zstd_v02.c | 644 #define FSE_CTABLE_SIZE_U32(maxTableLog, maxSymbolValue) (1 + (1<<(maxTableLog-1)) + ((maxSymbolV… argument 1085 (FSE_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog) in FSE_buildDTable() argument 1101 if (maxSymbolValue > FSE_MAX_SYMBOL_VALUE) return ERROR(maxSymbolValue_tooLarge); in FSE_buildDTable() 1106 for (s=0; s<=maxSymbolValue; s++) in FSE_buildDTable() 1121 for (s=0; s<=maxSymbolValue; s++) in FSE_buildDTable() 1307 const unsigned maxSymbolValue = tableMask; in FSE_buildDTable_raw() local 1316 for (s=0; s<=maxSymbolValue; s++) in FSE_buildDTable_raw() 1416 unsigned maxSymbolValue = FSE_MAX_SYMBOL_VALUE; in FSE_decompress() local 1422 errorCode = FSE_readNCount (counting, &maxSymbolValue, &tableLog, istart, cSrcSize); in FSE_decompress() 1428 errorCode = FSE_buildDTable (dt, counting, maxSymbolValue, tableLog); in FSE_decompress()
|
| D | zstd_v04.c | 544 …ildDTable ( FSE_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tabl… 882 #define FSE_CTABLE_SIZE_U32(maxTableLog, maxSymbolValue) (1 + (1<<(maxTableLog-1)) + ((maxSymbolV… argument 1125 …buildDTable(FSE_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tabl… in FSE_buildDTable() argument 1141 if (maxSymbolValue > FSE_MAX_SYMBOL_VALUE) return ERROR(maxSymbolValue_tooLarge); in FSE_buildDTable() 1146 for (s=0; s<=maxSymbolValue; s++) in FSE_buildDTable() 1161 for (s=0; s<=maxSymbolValue; s++) in FSE_buildDTable() 1349 const unsigned maxSymbolValue = tableMask; in FSE_buildDTable_raw() local 1358 for (s=0; s<=maxSymbolValue; s++) in FSE_buildDTable_raw() 1461 unsigned maxSymbolValue = FSE_MAX_SYMBOL_VALUE; in FSE_decompress() local 1467 errorCode = FSE_readNCount (counting, &maxSymbolValue, &tableLog, istart, cSrcSize); in FSE_decompress() [all …]
|
| D | zstd_v05.c | 649 …dDTable (FSEv05_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tabl… 1207 …ldDTable(FSEv05_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tabl… in FSEv05_buildDTable() argument 1223 if (maxSymbolValue > FSEv05_MAX_SYMBOL_VALUE) return ERROR(maxSymbolValue_tooLarge); in FSEv05_buildDTable() 1228 for (s=0; s<=maxSymbolValue; s++) { in FSEv05_buildDTable() 1238 for (s=0; s<=maxSymbolValue; s++) { in FSEv05_buildDTable() 1403 const unsigned maxSymbolValue = tableMask; in FSEv05_buildDTable_raw() local 1412 for (s=0; s<=maxSymbolValue; s++) { in FSEv05_buildDTable_raw() 1510 unsigned maxSymbolValue = FSEv05_MAX_SYMBOL_VALUE; in FSEv05_decompress() local 1516 errorCode = FSEv05_readNCount (counting, &maxSymbolValue, &tableLog, istart, cSrcSize); in FSEv05_decompress() 1522 errorCode = FSEv05_buildDTable (dt, counting, maxSymbolValue, tableLog); in FSEv05_decompress()
|
| D | zstd_v06.c | 718 …dDTable (FSEv06_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tabl… 1458 …ldDTable(FSEv06_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tabl… in FSEv06_buildDTable() argument 1464 U32 const maxSV1 = maxSymbolValue + 1; in FSEv06_buildDTable() 1469 if (maxSymbolValue > FSEv06_MAX_SYMBOL_VALUE) return ERROR(maxSymbolValue_tooLarge); in FSEv06_buildDTable() 1656 unsigned maxSymbolValue = FSEv06_MAX_SYMBOL_VALUE; in FSEv06_decompress() local 1661 …{ size_t const NCountLength = FSEv06_readNCount (counting, &maxSymbolValue, &tableLog, istart, c… in FSEv06_decompress() 1668 { size_t const errorCode = FSEv06_buildDTable (dt, counting, maxSymbolValue, tableLog); in FSEv06_decompress()
|
| D | zstd_v07.c | 766 …dDTable (FSEv07_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tabl… 824 …imalTableLog_internal(unsigned maxTableLog, size_t srcSize, unsigned maxSymbolValue, unsigned minu… 1478 …ldDTable(FSEv07_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tabl… in FSEv07_buildDTable() argument 1484 U32 const maxSV1 = maxSymbolValue + 1; in FSEv07_buildDTable() 1489 if (maxSymbolValue > FSEv07_MAX_SYMBOL_VALUE) return ERROR(maxSymbolValue_tooLarge); in FSEv07_buildDTable() 1676 unsigned maxSymbolValue = FSEv07_MAX_SYMBOL_VALUE; in FSEv07_decompress() local 1681 …{ size_t const NCountLength = FSEv07_readNCount (counting, &maxSymbolValue, &tableLog, istart, c… in FSEv07_decompress() 1688 { size_t const errorCode = FSEv07_buildDTable (dt, counting, maxSymbolValue, tableLog); in FSEv07_decompress()
|
| /freebsd-12-stable/sys/contrib/zstd/lib/decompress/ |
| D | zstd_decompress.c | 805 const short* normalizedCounter, unsigned maxSymbolValue, in ZSTD_buildFSETable() argument 812 U32 const maxSV1 = maxSymbolValue + 1; in ZSTD_buildFSETable() 817 assert(maxSymbolValue <= MaxSeq); in ZSTD_buildFSETable()
|