Lines Matching defs:ddict

78                                                      * the load factor of the ddict hash set.
97 static size_t ZSTD_DDictHashSet_emplaceDDict(ZSTD_DDictHashSet* hashSet, const ZSTD_DDict* ddict) {
98 const U32 dictID = ZSTD_getDictID_fromDDict(ddict);
104 /* Replace existing ddict if inserting ddict with same dictID */
107 hashSet->ddictPtrTable[idx] = ddict;
114 hashSet->ddictPtrTable[idx] = ddict;
155 /* currDictID == 0 implies a NULL ddict entry */
166 /* Allocates space for and returns a ddict hash set
189 DEBUGLOG(4, "Freeing ddict hash set");
201 static size_t ZSTD_DDictHashSet_addDDict(ZSTD_DDictHashSet* hashSet, const ZSTD_DDict* ddict, ZSTD_customMem customMem) {
202 DEBUGLOG(4, "Adding dict ID: %u to hashset with - Count: %zu Tablesize: %zu", ZSTD_getDictID_fromDDict(ddict), hashSet->ddictPtrCount, hashSet->ddictPtrTableSize);
206 FORWARD_IF_ERROR(ZSTD_DDictHashSet_emplaceDDict(hashSet, ddict), "");
245 dctx->ddict = NULL;
305 dctx->ddict = NULL;
335 * accordingly sets the ddict to be used to decompress the frame.
337 * If no DDict is found, then no action is taken, and the ZSTD_DCtx::ddict remains as-is.
344 if (dctx->ddict) {
350 dctx->ddict = frameDDict;
942 const ZSTD_DDict* ddict)
948 assert(dict==NULL || ddict==NULL); /* either dict or ddict set, not both */
950 if (ddict) {
951 dict = ZSTD_DDict_dictContent(ddict);
952 dictSize = ZSTD_DDict_dictSize(ddict);
971 if (ddict) {
973 FORWARD_IF_ERROR(ZSTD_decompressBegin_usingDDict(dctx, ddict), "");
976 * use this in all cases but ddict */
1027 return dctx->ddict;
1030 return dctx->ddict;
1432 size_t ZSTD_decompressBegin_usingDDict(ZSTD_DCtx* dctx, const ZSTD_DDict* ddict)
1436 if (ddict) {
1437 const char* const dictStart = (const char*)ZSTD_DDict_dictContent(ddict);
1438 size_t const dictSize = ZSTD_DDict_dictSize(ddict);
1445 if (ddict) { /* NULL ddict is equivalent to no dictionary */
1446 ZSTD_copyDDictParameters(dctx, ddict);
1490 const ZSTD_DDict* ddict)
1495 ddict);
1540 dctx->ddict = dctx->ddictLocal;
1588 * ddict will just be referenced, and must outlive decompression session
1590 size_t ZSTD_initDStream_usingDDict(ZSTD_DStream* dctx, const ZSTD_DDict* ddict)
1593 FORWARD_IF_ERROR( ZSTD_DCtx_refDDict(dctx, ddict) , "");
1607 size_t ZSTD_DCtx_refDDict(ZSTD_DCtx* dctx, const ZSTD_DDict* ddict)
1611 if (ddict) {
1612 dctx->ddict = ddict;
1622 FORWARD_IF_ERROR(ZSTD_DDictHashSet_addDDict(dctx->ddictSet, ddict, dctx->customMem), "");