Lines Matching defs:table

113     /* Write table description header */
165 BYTE bitsToWeight[HUF_TABLELOG_MAX + 1]; /* precomputed conversion table */
565 /* Set up the rankPosition table */
571 /* Insert each symbol into their appropriate bucket, setting up rankPosition table. */
700 if (maxNbBits > HUF_TABLELOG_MAX) return ERROR(GENERIC); /* check fit into table */
1173 * and occupies the same space as a table of HUF_WORKSPACE_SIZE_U64 unsigned */
1183 HUF_compress_tables_t* const table = (HUF_compress_tables_t*)HUF_alignUpWorkspace(workSpace, &wkspSize, ZSTD_ALIGNOF(size_t));
1188 HUF_STATIC_ASSERT(sizeof(*table) + HUF_WORKSPACE_MAX_ALIGNMENT <= HUF_WORKSPACE_SIZE);
1191 if (wkspSize < sizeof(*table)) return ERROR(workSpace_tooSmall);
1200 /* Heuristic : If old table is valid, use it for small inputs */
1212 CHECK_V_F(largestBegin, HIST_count_simple (table->count, &maxSymbolValueBegin, (const BYTE*)src, SUSPECT_INCOMPRESSIBLE_SAMPLE_SIZE) );
1216 CHECK_V_F(largestEnd, HIST_count_simple (table->count, &maxSymbolValueEnd, (const BYTE*)src + srcSize - SUSPECT_INCOMPRESSIBLE_SAMPLE_SIZE, SUSPECT_INCOMPRESSIBLE_SAMPLE_SIZE) );
1223 { CHECK_V_F(largest, HIST_count_wksp (table->count, &maxSymbolValue, (const BYTE*)src, srcSize, table->wksps.hist_wksp, sizeof(table->wksps.hist_wksp)) );
1228 /* Check validity of previous table */
1231 && !HUF_validateCTable(oldHufTable, table->count, maxSymbolValue)) {
1234 /* Heuristic : use existing table for small inputs */
1243 { size_t const maxBits = HUF_buildCTable_wksp(table->CTable, table->count,
1245 &table->wksps.buildCTable_wksp, sizeof(table->wksps.buildCTable_wksp));
1252 size_t const unusedSize = sizeof(table->CTable) - ctableSize * sizeof(HUF_CElt);
1253 ZSTD_memset(table->CTable + ctableSize, 0, unusedSize);
1256 /* Write table description header */
1257 { CHECK_V_F(hSize, HUF_writeCTable_wksp(op, dstSize, table->CTable, maxSymbolValue, huffLog,
1258 &table->wksps.writeCTable_wksp, sizeof(table->wksps.writeCTable_wksp)) );
1259 /* Check if using previous huffman table is beneficial */
1261 size_t const oldSize = HUF_estimateCompressedSize(oldHufTable, table->count, maxSymbolValue);
1262 size_t const newSize = HUF_estimateCompressedSize(table->CTable, table->count, maxSymbolValue);
1269 /* Use the new huffman table */
1274 ZSTD_memcpy(oldHufTable, table->CTable, sizeof(table->CTable)); /* Save new table */
1278 nbStreams, table->CTable, bmi2);
1323 * re-use an existing huffman compression table */