Lines Matching refs:dictList

535 static U32 ZDICT_dictSize(const dictItem* dictList)  in ZDICT_dictSize()  argument
538 for (u=1; u<dictList[0].pos; u++) in ZDICT_dictSize()
539 dictSize += dictList[u].length; in ZDICT_dictSize()
544 static size_t ZDICT_trainBuffer_legacy(dictItem* dictList, U32 dictListSize, in ZDICT_trainBuffer_legacy() argument
603 ZDICT_insertDictItem(dictList, dictListSize, solution, buffer); in ZDICT_trainBuffer_legacy()
1059 dictItem* const dictList = (dictItem*)malloc(dictListSize * sizeof(*dictList)); in ZDICT_trainFromBuffer_unsafe_legacy() local
1068 if (!dictList) return ERROR(memory_allocation); in ZDICT_trainFromBuffer_unsafe_legacy()
1069 …if (maxDictSize < ZDICT_DICTSIZE_MIN) { free(dictList); return ERROR(dstSize_tooSmall); } /* req… in ZDICT_trainFromBuffer_unsafe_legacy()
1070 …if (samplesBuffSize < ZDICT_MIN_SAMPLES_SIZE) { free(dictList); return ERROR(dictionaryCreation_fa… in ZDICT_trainFromBuffer_unsafe_legacy()
1073 ZDICT_initDictItem(dictList); in ZDICT_trainFromBuffer_unsafe_legacy()
1076 ZDICT_trainBuffer_legacy(dictList, dictListSize, in ZDICT_trainFromBuffer_unsafe_legacy()
1083 unsigned const nb = MIN(25, dictList[0].pos); in ZDICT_trainFromBuffer_unsafe_legacy()
1084 unsigned const dictContentSize = ZDICT_dictSize(dictList); in ZDICT_trainFromBuffer_unsafe_legacy()
1086 …DISPLAYLEVEL(3, "\n %u segments found, of total size %u \n", (unsigned)dictList[0].pos-1, dictCont… in ZDICT_trainFromBuffer_unsafe_legacy()
1089 unsigned const pos = dictList[u].pos; in ZDICT_trainFromBuffer_unsafe_legacy()
1090 unsigned const length = dictList[u].length; in ZDICT_trainFromBuffer_unsafe_legacy()
1093 free(dictList); in ZDICT_trainFromBuffer_unsafe_legacy()
1097 u, length, pos, (unsigned)dictList[u].savings); in ZDICT_trainFromBuffer_unsafe_legacy()
1104 { unsigned dictContentSize = ZDICT_dictSize(dictList); in ZDICT_trainFromBuffer_unsafe_legacy()
1105 …if (dictContentSize < ZDICT_CONTENTSIZE_MIN) { free(dictList); return ERROR(dictionaryCreation_fai… in ZDICT_trainFromBuffer_unsafe_legacy()
1125 { U32 const max = dictList->pos; /* convention : nb of useful elts within dictList */ in ZDICT_trainFromBuffer_unsafe_legacy()
1128 currentSize += dictList[n].length; in ZDICT_trainFromBuffer_unsafe_legacy()
1129 if (currentSize > targetDictSize) { currentSize -= dictList[n].length; break; } in ZDICT_trainFromBuffer_unsafe_legacy()
1131 dictList->pos = n; in ZDICT_trainFromBuffer_unsafe_legacy()
1138 for (u=1; u<dictList->pos; u++) { in ZDICT_trainFromBuffer_unsafe_legacy()
1139 U32 l = dictList[u].length; in ZDICT_trainFromBuffer_unsafe_legacy()
1141 … if (ptr<(BYTE*)dictBuffer) { free(dictList); return ERROR(GENERIC); } /* should not happen */ in ZDICT_trainFromBuffer_unsafe_legacy()
1142 memcpy(ptr, (const char*)samplesBuffer+dictList[u].pos, l); in ZDICT_trainFromBuffer_unsafe_legacy()
1151 free(dictList); in ZDICT_trainFromBuffer_unsafe_legacy()