• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-12-stable/sys/contrib/zstd/lib/dictBuilder/

Lines Matching refs:dictList

488 static U32 ZDICT_dictSize(const dictItem* dictList)
491 for (u=1; u<dictList[0].pos; u++)
492 dictSize += dictList[u].length;
497 static size_t ZDICT_trainBuffer_legacy(dictItem* dictList, U32 dictListSize,
555 ZDICT_insertDictItem(dictList, dictListSize, solution, buffer);
961 dictItem* const dictList = (dictItem*)malloc(dictListSize * sizeof(*dictList));
970 if (!dictList) return ERROR(memory_allocation);
971 if (maxDictSize < ZDICT_DICTSIZE_MIN) { free(dictList); return ERROR(dstSize_tooSmall); } /* requested dictionary size is too small */
972 if (samplesBuffSize < ZDICT_MIN_SAMPLES_SIZE) { free(dictList); return ERROR(dictionaryCreation_failed); } /* not enough source to create dictionary */
975 ZDICT_initDictItem(dictList);
978 ZDICT_trainBuffer_legacy(dictList, dictListSize,
985 U32 const nb = MIN(25, dictList[0].pos);
986 U32 const dictContentSize = ZDICT_dictSize(dictList);
988 DISPLAYLEVEL(3, "\n %u segments found, of total size %u \n", dictList[0].pos-1, dictContentSize);
991 U32 const pos = dictList[u].pos;
992 U32 const length = dictList[u].length;
997 u, length, pos, dictList[u].savings);
1004 { U32 dictContentSize = ZDICT_dictSize(dictList);
1005 if (dictContentSize < ZDICT_CONTENTSIZE_MIN) { free(dictList); return ERROR(dictionaryCreation_failed); } /* dictionary content too small */
1025 { U32 const max = dictList->pos; /* convention : nb of useful elts within dictList */
1028 currentSize += dictList[n].length;
1029 if (currentSize > targetDictSize) { currentSize -= dictList[n].length; break; }
1031 dictList->pos = n;
1038 for (u=1; u<dictList->pos; u++) {
1039 U32 l = dictList[u].length;
1041 if (ptr<(BYTE*)dictBuffer) { free(dictList); return ERROR(GENERIC); } /* should not happen */
1042 memcpy(ptr, (const char*)samplesBuffer+dictList[u].pos, l);
1051 free(dictList);