Lines Matching refs:ctxPtr

863 static void LZ4HC_setExternalDict(LZ4HC_CCtx_internal* ctxPtr, const BYTE* newBlock);
1069 LZ4HC_CCtx_internal* const ctxPtr = &LZ4_streamHCPtr->internal_donotuse;
1077 { int const cLevel = ctxPtr->compressionLevel;
1081 LZ4HC_init_internal (ctxPtr, (const BYTE*)dictionary);
1082 ctxPtr->end = (const BYTE*)dictionary + dictSize;
1083 if (dictSize >= 4) LZ4HC_Insert (ctxPtr, ctxPtr->end-3);
1093 static void LZ4HC_setExternalDict(LZ4HC_CCtx_internal* ctxPtr, const BYTE* newBlock)
1095 DEBUGLOG(4, "LZ4HC_setExternalDict(%p, %p)", ctxPtr, newBlock);
1096 if (ctxPtr->end >= ctxPtr->prefixStart + 4)
1097 LZ4HC_Insert (ctxPtr, ctxPtr->end-3); /* Referencing remaining dictionary content */
1100 ctxPtr->lowLimit = ctxPtr->dictLimit;
1101 ctxPtr->dictStart = ctxPtr->prefixStart;
1102 ctxPtr->dictLimit += (U32)(ctxPtr->end - ctxPtr->prefixStart);
1103 ctxPtr->prefixStart = newBlock;
1104 ctxPtr->end = newBlock;
1105 ctxPtr->nextToUpdate = ctxPtr->dictLimit; /* match referencing will resume from there */
1108 ctxPtr->dictCtx = NULL;
1117 LZ4HC_CCtx_internal* const ctxPtr = &LZ4_streamHCPtr->internal_donotuse;
1120 assert(ctxPtr != NULL);
1122 if (ctxPtr->prefixStart == NULL) LZ4HC_init_internal (ctxPtr, (const BYTE*) src);
1125 if ((size_t)(ctxPtr->end - ctxPtr->prefixStart) + ctxPtr->dictLimit > 2 GB) {
1126 size_t dictSize = (size_t)(ctxPtr->end - ctxPtr->prefixStart);
1128 LZ4_loadDictHC(LZ4_streamHCPtr, (const char*)(ctxPtr->end) - dictSize, (int)dictSize);
1132 if ((const BYTE*)src != ctxPtr->end)
1133 LZ4HC_setExternalDict(ctxPtr, (const BYTE*)src);
1137 const BYTE* const dictBegin = ctxPtr->dictStart;
1138 const BYTE* const dictEnd = ctxPtr->dictStart + (ctxPtr->dictLimit - ctxPtr->lowLimit);
1141 ctxPtr->lowLimit += (U32)(sourceEnd - ctxPtr->dictStart);
1142 ctxPtr->dictStart += (U32)(sourceEnd - ctxPtr->dictStart);
1143 if (ctxPtr->dictLimit - ctxPtr->lowLimit < 4) {
1144 ctxPtr->lowLimit = ctxPtr->dictLimit;
1145 ctxPtr->dictStart = ctxPtr->prefixStart;
1148 return LZ4HC_compress_generic (ctxPtr, src, dst, srcSizePtr, dstCapacity, ctxPtr->compressionLevel, limit);