• Home
  • Raw
  • Download

Lines Matching refs:dctx

1021     LZ4F_dctx* const dctx = (LZ4F_dctx*)ALLOC_AND_ZERO(sizeof(LZ4F_dctx));  in LZ4F_createDecompressionContext()  local
1022 if (dctx==NULL) return err0r(LZ4F_ERROR_GENERIC); in LZ4F_createDecompressionContext()
1024 dctx->version = versionNumber; in LZ4F_createDecompressionContext()
1025 *LZ4F_decompressionContextPtr = dctx; in LZ4F_createDecompressionContext()
1029 LZ4F_errorCode_t LZ4F_freeDecompressionContext(LZ4F_dctx* dctx) in LZ4F_freeDecompressionContext() argument
1032 if (dctx != NULL) { /* can accept NULL input, like free() */ in LZ4F_freeDecompressionContext()
1033 result = (LZ4F_errorCode_t)dctx->dStage; in LZ4F_freeDecompressionContext()
1034 FREEMEM(dctx->tmpIn); in LZ4F_freeDecompressionContext()
1035 FREEMEM(dctx->tmpOutBuffer); in LZ4F_freeDecompressionContext()
1036 FREEMEM(dctx); in LZ4F_freeDecompressionContext()
1044 void LZ4F_resetDecompressionContext(LZ4F_dctx* dctx) in LZ4F_resetDecompressionContext() argument
1046 dctx->dStage = dstage_getFrameHeader; in LZ4F_resetDecompressionContext()
1047 dctx->dict = NULL; in LZ4F_resetDecompressionContext()
1048 dctx->dictSize = 0; in LZ4F_resetDecompressionContext()
1085 static size_t LZ4F_decodeHeader(LZ4F_dctx* dctx, const void* src, size_t srcSize) in LZ4F_decodeHeader() argument
1093 MEM_INIT(&(dctx->frameInfo), 0, sizeof(dctx->frameInfo)); in LZ4F_decodeHeader()
1097 dctx->frameInfo.frameType = LZ4F_skippableFrame; in LZ4F_decodeHeader()
1098 if (src == (void*)(dctx->header)) { in LZ4F_decodeHeader()
1099 dctx->tmpInSize = srcSize; in LZ4F_decodeHeader()
1100 dctx->tmpInTarget = 8; in LZ4F_decodeHeader()
1101 dctx->dStage = dstage_storeSFrameSize; in LZ4F_decodeHeader()
1104 dctx->dStage = dstage_getSFrameSize; in LZ4F_decodeHeader()
1112 dctx->frameInfo.frameType = LZ4F_frame; in LZ4F_decodeHeader()
1132 if (srcPtr != dctx->header) in LZ4F_decodeHeader()
1133 memcpy(dctx->header, srcPtr, srcSize); in LZ4F_decodeHeader()
1134 dctx->tmpInSize = srcSize; in LZ4F_decodeHeader()
1135 dctx->tmpInTarget = frameHeaderSize; in LZ4F_decodeHeader()
1136 dctx->dStage = dstage_storeFrameHeader; in LZ4F_decodeHeader()
1155 dctx->frameInfo.blockMode = (LZ4F_blockMode_t)blockMode; in LZ4F_decodeHeader()
1156 dctx->frameInfo.blockChecksumFlag = (LZ4F_blockChecksum_t)blockChecksumFlag; in LZ4F_decodeHeader()
1157 dctx->frameInfo.contentChecksumFlag = (LZ4F_contentChecksum_t)contentChecksumFlag; in LZ4F_decodeHeader()
1158 dctx->frameInfo.blockSizeID = (LZ4F_blockSizeID_t)blockSizeID; in LZ4F_decodeHeader()
1159 dctx->maxBlockSize = LZ4F_getBlockSize(blockSizeID); in LZ4F_decodeHeader()
1161 dctx->frameRemainingSize = in LZ4F_decodeHeader()
1162 dctx->frameInfo.contentSize = LZ4F_readLE64(srcPtr+6); in LZ4F_decodeHeader()
1164 dctx->frameInfo.dictID = LZ4F_readLE32(srcPtr + frameHeaderSize - 5); in LZ4F_decodeHeader()
1166 dctx->dStage = dstage_init; in LZ4F_decodeHeader()
1187 LZ4F_errorCode_t LZ4F_getFrameInfo(LZ4F_dctx* dctx, LZ4F_frameInfo_t* frameInfoPtr, in LZ4F_getFrameInfo() argument
1190 …if (dctx->dStage > dstage_storeFrameHeader) { /* assumption : dstage_* header enum at beginning … in LZ4F_getFrameInfo()
1194 *frameInfoPtr = dctx->frameInfo; in LZ4F_getFrameInfo()
1196 return LZ4F_decompress(dctx, NULL, &o, NULL, &i, NULL); in LZ4F_getFrameInfo()
1198 if (dctx->dStage == dstage_storeFrameHeader) { in LZ4F_getFrameInfo()
1211 decodeResult = LZ4F_decodeHeader(dctx, srcBuffer, hSize); in LZ4F_getFrameInfo()
1218 *frameInfoPtr = dctx->frameInfo; in LZ4F_getFrameInfo()
1226 static void LZ4F_updateDict(LZ4F_dctx* dctx, in LZ4F_updateDict() argument
1230 if (dctx->dictSize==0) in LZ4F_updateDict()
1231 dctx->dict = (const BYTE*)dstPtr; /* priority to dictionary continuity */ in LZ4F_updateDict()
1233 …if (dctx->dict + dctx->dictSize == dstPtr) { /* dictionary continuity, directly within dstBuffer … in LZ4F_updateDict()
1234 dctx->dictSize += dstSize; in LZ4F_updateDict()
1239 dctx->dict = (const BYTE*)dstBufferStart; in LZ4F_updateDict()
1240 dctx->dictSize = dstPtr - dstBufferStart + dstSize; in LZ4F_updateDict()
1248 …if ((withinTmp) && (dctx->dict == dctx->tmpOutBuffer)) { /* continue history within tmpOutBuffer… in LZ4F_updateDict()
1250 assert(dctx->dict + dctx->dictSize == dctx->tmpOut + dctx->tmpOutStart); in LZ4F_updateDict()
1251 dctx->dictSize += dstSize; in LZ4F_updateDict()
1256 size_t const preserveSize = dctx->tmpOut - dctx->tmpOutBuffer; in LZ4F_updateDict()
1257 size_t copySize = 64 KB - dctx->tmpOutSize; in LZ4F_updateDict()
1258 const BYTE* const oldDictEnd = dctx->dict + dctx->dictSize - dctx->tmpOutStart; in LZ4F_updateDict()
1259 if (dctx->tmpOutSize > 64 KB) copySize = 0; in LZ4F_updateDict()
1262 memcpy(dctx->tmpOutBuffer + preserveSize - copySize, oldDictEnd - copySize, copySize); in LZ4F_updateDict()
1264 dctx->dict = dctx->tmpOutBuffer; in LZ4F_updateDict()
1265 dctx->dictSize = preserveSize + dctx->tmpOutStart + dstSize; in LZ4F_updateDict()
1269 if (dctx->dict == dctx->tmpOutBuffer) { /* copy dst into tmp to complete dict */ in LZ4F_updateDict()
1270 if (dctx->dictSize + dstSize > dctx->maxBufferSize) { /* tmp buffer not large enough */ in LZ4F_updateDict()
1272 memcpy(dctx->tmpOutBuffer, dctx->dict + dctx->dictSize - preserveSize, preserveSize); in LZ4F_updateDict()
1273 dctx->dictSize = preserveSize; in LZ4F_updateDict()
1275 memcpy(dctx->tmpOutBuffer + dctx->dictSize, dstPtr, dstSize); in LZ4F_updateDict()
1276 dctx->dictSize += dstSize; in LZ4F_updateDict()
1282 if (preserveSize > dctx->dictSize) preserveSize = dctx->dictSize; in LZ4F_updateDict()
1283 memcpy(dctx->tmpOutBuffer, dctx->dict + dctx->dictSize - preserveSize, preserveSize); in LZ4F_updateDict()
1284 memcpy(dctx->tmpOutBuffer + preserveSize, dstPtr, dstSize); in LZ4F_updateDict()
1285 dctx->dict = dctx->tmpOutBuffer; in LZ4F_updateDict()
1286 dctx->dictSize = preserveSize + dstSize; in LZ4F_updateDict()
1310 size_t LZ4F_decompress(LZ4F_dctx* dctx, in LZ4F_decompress() argument
1336 switch(dctx->dStage) in LZ4F_decompress()
1341 …size_t const hSize = LZ4F_decodeHeader(dctx, srcPtr, srcEnd-srcPtr); /* will update dStage approp… in LZ4F_decompress()
1346 dctx->tmpInSize = 0; in LZ4F_decompress()
1348 dctx->tmpInTarget = minFHSize; /* minimum size to decode header */ in LZ4F_decompress()
1349 dctx->dStage = dstage_storeFrameHeader; in LZ4F_decompress()
1353 … { size_t const sizeToCopy = MIN(dctx->tmpInTarget - dctx->tmpInSize, (size_t)(srcEnd - srcPtr)); in LZ4F_decompress()
1354 memcpy(dctx->header + dctx->tmpInSize, srcPtr, sizeToCopy); in LZ4F_decompress()
1355 dctx->tmpInSize += sizeToCopy; in LZ4F_decompress()
1358 if (dctx->tmpInSize < dctx->tmpInTarget) { in LZ4F_decompress()
1359 …nextSrcSizeHint = (dctx->tmpInTarget - dctx->tmpInSize) + BHSize; /* rest of header + nextBlockH… in LZ4F_decompress()
1363 …{ size_t const hSize = LZ4F_decodeHeader(dctx, dctx->header, dctx->tmpInTarget); /* will update… in LZ4F_decompress()
1369 if (dctx->frameInfo.contentChecksumFlag) XXH32_reset(&(dctx->xxh), 0); in LZ4F_decompress()
1371 { size_t const bufferNeeded = dctx->maxBlockSize in LZ4F_decompress()
1372 + ((dctx->frameInfo.blockMode==LZ4F_blockLinked) * 128 KB); in LZ4F_decompress()
1373 if (bufferNeeded > dctx->maxBufferSize) { /* tmp buffers too small */ in LZ4F_decompress()
1374dctx->maxBufferSize = 0; /* ensure allocation will be re-attempted on next entry*/ in LZ4F_decompress()
1375 FREEMEM(dctx->tmpIn); in LZ4F_decompress()
1376 dctx->tmpIn = (BYTE*)ALLOC(dctx->maxBlockSize + 4 /* block checksum */); in LZ4F_decompress()
1377 if (dctx->tmpIn == NULL) in LZ4F_decompress()
1379 FREEMEM(dctx->tmpOutBuffer); in LZ4F_decompress()
1380 dctx->tmpOutBuffer= (BYTE*)ALLOC(bufferNeeded); in LZ4F_decompress()
1381 if (dctx->tmpOutBuffer== NULL) in LZ4F_decompress()
1383 dctx->maxBufferSize = bufferNeeded; in LZ4F_decompress()
1385 dctx->tmpInSize = 0; in LZ4F_decompress()
1386 dctx->tmpInTarget = 0; in LZ4F_decompress()
1387 dctx->tmpOut = dctx->tmpOutBuffer; in LZ4F_decompress()
1388 dctx->tmpOutStart = 0; in LZ4F_decompress()
1389 dctx->tmpOutSize = 0; in LZ4F_decompress()
1391 dctx->dStage = dstage_getBlockHeader; in LZ4F_decompress()
1400 dctx->tmpInSize = 0; in LZ4F_decompress()
1401 dctx->dStage = dstage_storeBlockHeader; in LZ4F_decompress()
1404 if (dctx->dStage == dstage_storeBlockHeader) /* can be skipped */ in LZ4F_decompress()
1407 size_t const wantedData = BHSize - dctx->tmpInSize; in LZ4F_decompress()
1409 memcpy(dctx->tmpIn + dctx->tmpInSize, srcPtr, sizeToCopy); in LZ4F_decompress()
1411 dctx->tmpInSize += sizeToCopy; in LZ4F_decompress()
1413 if (dctx->tmpInSize < BHSize) { /* not enough input for cBlockSize */ in LZ4F_decompress()
1414 nextSrcSizeHint = BHSize - dctx->tmpInSize; in LZ4F_decompress()
1418 selectedIn = dctx->tmpIn; in LZ4F_decompress()
1423 size_t const crcSize = dctx->frameInfo.blockChecksumFlag * 4; in LZ4F_decompress()
1425 dctx->dStage = dstage_getSuffix; in LZ4F_decompress()
1428 if (nextCBlockSize > dctx->maxBlockSize) in LZ4F_decompress()
1432 dctx->tmpInTarget = nextCBlockSize; in LZ4F_decompress()
1433 if (dctx->frameInfo.blockChecksumFlag) { in LZ4F_decompress()
1434 XXH32_reset(&dctx->blockChecksum, 0); in LZ4F_decompress()
1436 dctx->dStage = dstage_copyDirect; in LZ4F_decompress()
1440 dctx->tmpInTarget = nextCBlockSize + crcSize; in LZ4F_decompress()
1441 dctx->dStage = dstage_getCBlock; in LZ4F_decompress()
1451 size_t const sizeToCopy = MIN(dctx->tmpInTarget, minBuffSize); in LZ4F_decompress()
1453 if (dctx->frameInfo.blockChecksumFlag) { in LZ4F_decompress()
1454 XXH32_update(&dctx->blockChecksum, srcPtr, sizeToCopy); in LZ4F_decompress()
1456 if (dctx->frameInfo.contentChecksumFlag) in LZ4F_decompress()
1457 XXH32_update(&dctx->xxh, srcPtr, sizeToCopy); in LZ4F_decompress()
1458 if (dctx->frameInfo.contentSize) in LZ4F_decompress()
1459 dctx->frameRemainingSize -= sizeToCopy; in LZ4F_decompress()
1462 if (dctx->frameInfo.blockMode == LZ4F_blockLinked) in LZ4F_decompress()
1463 LZ4F_updateDict(dctx, dstPtr, sizeToCopy, dstStart, 0); in LZ4F_decompress()
1467 if (sizeToCopy == dctx->tmpInTarget) { /* all done */ in LZ4F_decompress()
1468 if (dctx->frameInfo.blockChecksumFlag) { in LZ4F_decompress()
1469 dctx->tmpInSize = 0; in LZ4F_decompress()
1470 dctx->dStage = dstage_getBlockChecksum; in LZ4F_decompress()
1472 dctx->dStage = dstage_getBlockHeader; /* new block */ in LZ4F_decompress()
1475 dctx->tmpInTarget -= sizeToCopy; /* need to copy more */ in LZ4F_decompress()
1476 nextSrcSizeHint = dctx->tmpInTarget + in LZ4F_decompress()
1477 + dctx->frameInfo.contentChecksumFlag * 4 /* block checksum */ in LZ4F_decompress()
1486 if ((srcEnd-srcPtr >= 4) && (dctx->tmpInSize==0)) { in LZ4F_decompress()
1490 size_t const stillToCopy = 4 - dctx->tmpInSize; in LZ4F_decompress()
1492 memcpy(dctx->header + dctx->tmpInSize, srcPtr, sizeToCopy); in LZ4F_decompress()
1493 dctx->tmpInSize += sizeToCopy; in LZ4F_decompress()
1495 if (dctx->tmpInSize < 4) { /* all input consumed */ in LZ4F_decompress()
1499 crcSrc = dctx->header; in LZ4F_decompress()
1502 U32 const calcCRC = XXH32_digest(&dctx->blockChecksum); in LZ4F_decompress()
1506 dctx->dStage = dstage_getBlockHeader; /* new block */ in LZ4F_decompress()
1510 if ((size_t)(srcEnd-srcPtr) < dctx->tmpInTarget) { in LZ4F_decompress()
1511 dctx->tmpInSize = 0; in LZ4F_decompress()
1512 dctx->dStage = dstage_storeCBlock; in LZ4F_decompress()
1517 srcPtr += dctx->tmpInTarget; in LZ4F_decompress()
1521 { size_t const wantedData = dctx->tmpInTarget - dctx->tmpInSize; in LZ4F_decompress()
1524 memcpy(dctx->tmpIn + dctx->tmpInSize, srcPtr, sizeToCopy); in LZ4F_decompress()
1525 dctx->tmpInSize += sizeToCopy; in LZ4F_decompress()
1527 if (dctx->tmpInSize < dctx->tmpInTarget) { /* need more input */ in LZ4F_decompress()
1528 nextSrcSizeHint = (dctx->tmpInTarget - dctx->tmpInSize) + BHSize; in LZ4F_decompress()
1532 selectedIn = dctx->tmpIn; in LZ4F_decompress()
1536 if (dctx->frameInfo.blockChecksumFlag) { in LZ4F_decompress()
1537 dctx->tmpInTarget -= 4; in LZ4F_decompress()
1539 { U32 const readBlockCrc = LZ4F_readLE32(selectedIn + dctx->tmpInTarget); in LZ4F_decompress()
1540 U32 const calcBlockCrc = XXH32(selectedIn, dctx->tmpInTarget, 0); in LZ4F_decompress()
1545 if ((size_t)(dstEnd-dstPtr) >= dctx->maxBlockSize) { in LZ4F_decompress()
1546 const char* dict = (const char*)dctx->dict; in LZ4F_decompress()
1547 size_t dictSize = dctx->dictSize; in LZ4F_decompress()
1557 (int)dctx->tmpInTarget, (int)dctx->maxBlockSize, in LZ4F_decompress()
1560 if (dctx->frameInfo.contentChecksumFlag) in LZ4F_decompress()
1561 XXH32_update(&(dctx->xxh), dstPtr, decodedSize); in LZ4F_decompress()
1562 if (dctx->frameInfo.contentSize) in LZ4F_decompress()
1563 dctx->frameRemainingSize -= decodedSize; in LZ4F_decompress()
1566 if (dctx->frameInfo.blockMode==LZ4F_blockLinked) in LZ4F_decompress()
1567 LZ4F_updateDict(dctx, dstPtr, decodedSize, dstStart, 0); in LZ4F_decompress()
1570 dctx->dStage = dstage_getBlockHeader; in LZ4F_decompress()
1576 if (dctx->frameInfo.blockMode == LZ4F_blockLinked) { in LZ4F_decompress()
1577 if (dctx->dict == dctx->tmpOutBuffer) { in LZ4F_decompress()
1578 if (dctx->dictSize > 128 KB) { in LZ4F_decompress()
1579 memcpy(dctx->tmpOutBuffer, dctx->dict + dctx->dictSize - 64 KB, 64 KB); in LZ4F_decompress()
1580 dctx->dictSize = 64 KB; in LZ4F_decompress()
1582 dctx->tmpOut = dctx->tmpOutBuffer + dctx->dictSize; in LZ4F_decompress()
1584 size_t const reservedDictSpace = MIN(dctx->dictSize, 64 KB); in LZ4F_decompress()
1585 dctx->tmpOut = dctx->tmpOutBuffer + reservedDictSpace; in LZ4F_decompress()
1589 { const char* dict = (const char*)dctx->dict; in LZ4F_decompress()
1590 size_t dictSize = dctx->dictSize; in LZ4F_decompress()
1598 (const char*)selectedIn, (char*)dctx->tmpOut, in LZ4F_decompress()
1599 (int)dctx->tmpInTarget, (int)dctx->maxBlockSize, in LZ4F_decompress()
1603 if (dctx->frameInfo.contentChecksumFlag) in LZ4F_decompress()
1604 XXH32_update(&(dctx->xxh), dctx->tmpOut, decodedSize); in LZ4F_decompress()
1605 if (dctx->frameInfo.contentSize) in LZ4F_decompress()
1606 dctx->frameRemainingSize -= decodedSize; in LZ4F_decompress()
1607 dctx->tmpOutSize = decodedSize; in LZ4F_decompress()
1608 dctx->tmpOutStart = 0; in LZ4F_decompress()
1609 dctx->dStage = dstage_flushOut; in LZ4F_decompress()
1614 … { size_t const sizeToCopy = MIN(dctx->tmpOutSize - dctx->tmpOutStart, (size_t)(dstEnd-dstPtr)); in LZ4F_decompress()
1615 memcpy(dstPtr, dctx->tmpOut + dctx->tmpOutStart, sizeToCopy); in LZ4F_decompress()
1618 if (dctx->frameInfo.blockMode == LZ4F_blockLinked) in LZ4F_decompress()
1619 LZ4F_updateDict(dctx, dstPtr, sizeToCopy, dstStart, 1 /*withinTmp*/); in LZ4F_decompress()
1621 dctx->tmpOutStart += sizeToCopy; in LZ4F_decompress()
1624 if (dctx->tmpOutStart == dctx->tmpOutSize) { /* all flushed */ in LZ4F_decompress()
1625 dctx->dStage = dstage_getBlockHeader; /* get next block */ in LZ4F_decompress()
1635 if (dctx->frameRemainingSize) in LZ4F_decompress()
1637 if (!dctx->frameInfo.contentChecksumFlag) { /* no checksum, frame is completed */ in LZ4F_decompress()
1639 LZ4F_resetDecompressionContext(dctx); in LZ4F_decompress()
1644 dctx->tmpInSize = 0; in LZ4F_decompress()
1645 dctx->dStage = dstage_storeSuffix; in LZ4F_decompress()
1651 if (dctx->dStage == dstage_storeSuffix) /* can be skipped */ in LZ4F_decompress()
1654 size_t const wantedData = 4 - dctx->tmpInSize; in LZ4F_decompress()
1656 memcpy(dctx->tmpIn + dctx->tmpInSize, srcPtr, sizeToCopy); in LZ4F_decompress()
1658 dctx->tmpInSize += sizeToCopy; in LZ4F_decompress()
1659 if (dctx->tmpInSize < 4) { /* not enough input to read complete suffix */ in LZ4F_decompress()
1660 nextSrcSizeHint = 4 - dctx->tmpInSize; in LZ4F_decompress()
1664 selectedIn = dctx->tmpIn; in LZ4F_decompress()
1669 U32 const resultCRC = XXH32_digest(&(dctx->xxh)); in LZ4F_decompress()
1673 LZ4F_resetDecompressionContext(dctx); in LZ4F_decompress()
1684 dctx->tmpInSize = 4; in LZ4F_decompress()
1685 dctx->tmpInTarget = 8; in LZ4F_decompress()
1686 dctx->dStage = dstage_storeSFrameSize; in LZ4F_decompress()
1689 if (dctx->dStage == dstage_storeSFrameSize) in LZ4F_decompress()
1691 { size_t const sizeToCopy = MIN(dctx->tmpInTarget - dctx->tmpInSize, in LZ4F_decompress()
1693 memcpy(dctx->header + dctx->tmpInSize, srcPtr, sizeToCopy); in LZ4F_decompress()
1695 dctx->tmpInSize += sizeToCopy; in LZ4F_decompress()
1696 if (dctx->tmpInSize < dctx->tmpInTarget) { in LZ4F_decompress()
1698 nextSrcSizeHint = dctx->tmpInTarget - dctx->tmpInSize; in LZ4F_decompress()
1702 selectedIn = dctx->header + 4; in LZ4F_decompress()
1707 dctx->frameInfo.contentSize = SFrameSize; in LZ4F_decompress()
1708 dctx->tmpInTarget = SFrameSize; in LZ4F_decompress()
1709 dctx->dStage = dstage_skipSkippable; in LZ4F_decompress()
1714 { size_t const skipSize = MIN(dctx->tmpInTarget, (size_t)(srcEnd-srcPtr)); in LZ4F_decompress()
1716 dctx->tmpInTarget -= skipSize; in LZ4F_decompress()
1718 nextSrcSizeHint = dctx->tmpInTarget; in LZ4F_decompress()
1721 LZ4F_resetDecompressionContext(dctx); in LZ4F_decompress()
1729 …if ( (dctx->frameInfo.blockMode==LZ4F_blockLinked) /* next block will use up to 64KB from previou… in LZ4F_decompress()
1730 && (dctx->dict != dctx->tmpOutBuffer) /* dictionary is not already within tmp */ in LZ4F_decompress()
1732 …&& ((unsigned)(dctx->dStage)-2 < (unsigned)(dstage_getSuffix)-2) ) /* valid stages : [init ... ge… in LZ4F_decompress()
1734 if (dctx->dStage == dstage_flushOut) { in LZ4F_decompress()
1735 size_t const preserveSize = dctx->tmpOut - dctx->tmpOutBuffer; in LZ4F_decompress()
1736 size_t copySize = 64 KB - dctx->tmpOutSize; in LZ4F_decompress()
1737 const BYTE* oldDictEnd = dctx->dict + dctx->dictSize - dctx->tmpOutStart; in LZ4F_decompress()
1738 if (dctx->tmpOutSize > 64 KB) copySize = 0; in LZ4F_decompress()
1742 … memcpy(dctx->tmpOutBuffer + preserveSize - copySize, oldDictEnd - copySize, copySize); in LZ4F_decompress()
1744 dctx->dict = dctx->tmpOutBuffer; in LZ4F_decompress()
1745 dctx->dictSize = preserveSize + dctx->tmpOutStart; in LZ4F_decompress()
1747 const BYTE* const oldDictEnd = dctx->dict + dctx->dictSize; in LZ4F_decompress()
1748 size_t const newDictSize = MIN(dctx->dictSize, 64 KB); in LZ4F_decompress()
1751 memcpy(dctx->tmpOutBuffer, oldDictEnd - newDictSize, newDictSize); in LZ4F_decompress()
1753 dctx->dict = dctx->tmpOutBuffer; in LZ4F_decompress()
1754 dctx->dictSize = newDictSize; in LZ4F_decompress()
1755 dctx->tmpOut = dctx->tmpOutBuffer + newDictSize; in LZ4F_decompress()
1769 size_t LZ4F_decompress_usingDict(LZ4F_dctx* dctx, in LZ4F_decompress_usingDict() argument
1775 if (dctx->dStage <= dstage_init) { in LZ4F_decompress_usingDict()
1776 dctx->dict = (const BYTE*)dict; in LZ4F_decompress_usingDict()
1777 dctx->dictSize = dictSize; in LZ4F_decompress_usingDict()
1779 return LZ4F_decompress(dctx, dstBuffer, dstSizePtr, in LZ4F_decompress_usingDict()