Lines Matching defs:srcPtr
188 static U32 LZ4F_readLE32 (const BYTE* srcPtr)
190 U32 value32 = srcPtr[0];
191 value32 += (srcPtr[1]<<8);
192 value32 += (srcPtr[2]<<16);
193 value32 += ((U32)srcPtr[3])<<24;
205 static U64 LZ4F_readLE64 (const BYTE* srcPtr)
207 U64 value64 = srcPtr[0];
208 value64 += ((U64)srcPtr[1]<<8);
209 value64 += ((U64)srcPtr[2]<<16);
210 value64 += ((U64)srcPtr[3]<<24);
211 value64 += ((U64)srcPtr[4]<<32);
212 value64 += ((U64)srcPtr[5]<<40);
213 value64 += ((U64)srcPtr[6]<<48);
214 value64 += ((U64)srcPtr[7]<<56);
567 const BYTE* srcPtr = (const BYTE*)srcBuffer;
568 const BYTE* const srcEnd = srcPtr + srcSize;
591 srcPtr = srcEnd;
600 srcPtr += sizeToCopy;
609 while ((size_t)(srcEnd - srcPtr) >= blockSize)
613 dstPtr += LZ4F_compressBlock(dstPtr, srcPtr, blockSize, compress, cctxPtr->lz4CtxPtr, cctxPtr->prefs.compressionLevel);
614 srcPtr += blockSize;
617 if ((cctxPtr->prefs.autoFlush) && (srcPtr < srcEnd))
621 dstPtr += LZ4F_compressBlock(dstPtr, srcPtr, srcEnd - srcPtr, compress, cctxPtr->lz4CtxPtr, cctxPtr->prefs.compressionLevel);
622 srcPtr = srcEnd;
649 if (srcPtr < srcEnd)
652 size_t sizeToCopy = srcEnd - srcPtr;
653 memcpy(cctxPtr->tmpIn, srcPtr, sizeToCopy);
816 const BYTE* srcPtr = (const BYTE*)srcVoidPtr;
823 if ((LZ4F_readLE32(srcPtr) & 0xFFFFFFF0U) == LZ4F_MAGIC_SKIPPABLE_START)
841 if (LZ4F_readLE32(srcPtr) != LZ4F_MAGICNUMBER) return (size_t)-LZ4F_ERROR_frameType_unknown;
845 FLG = srcPtr[4];
858 if (srcPtr != dctxPtr->header)
859 memcpy(dctxPtr->header, srcPtr, srcSize);
866 BD = srcPtr[5];
878 HC = LZ4F_headerChecksum(srcPtr+4, frameHeaderSize-5);
879 if (HC != srcPtr[frameHeaderSize-1]) return (size_t)-LZ4F_ERROR_headerChecksum_invalid; /* Bad header checksum error */
887 dctxPtr->frameRemainingSize = dctxPtr->frameInfo.contentSize = LZ4F_readLE64(srcPtr+6);
1053 const BYTE* srcPtr = srcStart;
1083 if ((size_t)(srcEnd-srcPtr) >= maxFHSize) /* enough to decode - shortcut */
1085 LZ4F_errorCode_t errorCode = LZ4F_decodeHeader(dctxPtr, srcPtr, srcEnd-srcPtr);
1087 srcPtr += errorCode;
1098 if (sizeToCopy > (size_t)(srcEnd - srcPtr)) sizeToCopy = srcEnd - srcPtr;
1099 memcpy(dctxPtr->header + dctxPtr->tmpInSize, srcPtr, sizeToCopy);
1101 srcPtr += sizeToCopy;
1117 if ((size_t)(srcEnd - srcPtr) >= BHSize)
1119 selectedIn = srcPtr;
1120 srcPtr += BHSize;
1134 if (sizeToCopy > (size_t)(srcEnd - srcPtr)) sizeToCopy = srcEnd - srcPtr;
1135 memcpy(dctxPtr->tmpIn + dctxPtr->tmpInSize, srcPtr, sizeToCopy);
1136 srcPtr += sizeToCopy;
1174 if ((size_t)(srcEnd-srcPtr) < sizeToCopy) sizeToCopy = srcEnd - srcPtr; /* not enough input to read full block */
1176 memcpy(dstPtr, srcPtr, sizeToCopy);
1177 if (dctxPtr->frameInfo.contentChecksumFlag) XXH32_update(&(dctxPtr->xxh), srcPtr, sizeToCopy);
1184 srcPtr += sizeToCopy;
1199 if ((size_t)(srcEnd-srcPtr) < dctxPtr->tmpInTarget)
1205 selectedIn = srcPtr;
1206 srcPtr += dctxPtr->tmpInTarget;
1214 if (sizeToCopy > (size_t)(srcEnd-srcPtr)) sizeToCopy = srcEnd-srcPtr;
1215 memcpy(dctxPtr->tmpIn + dctxPtr->tmpInSize, srcPtr, sizeToCopy);
1217 srcPtr += sizeToCopy;
1339 if ((srcEnd - srcPtr) < 4) /* not enough size for entire CRC */
1346 selectedIn = srcPtr;
1347 srcPtr += 4;
1355 if (sizeToCopy > (size_t)(srcEnd - srcPtr)) sizeToCopy = srcEnd - srcPtr;
1356 memcpy(dctxPtr->tmpIn + dctxPtr->tmpInSize, srcPtr, sizeToCopy);
1357 srcPtr += sizeToCopy;
1381 if ((srcEnd - srcPtr) >= 4)
1383 selectedIn = srcPtr;
1384 srcPtr += 4;
1399 if (sizeToCopy > (size_t)(srcEnd - srcPtr)) sizeToCopy = srcEnd - srcPtr;
1400 memcpy(dctxPtr->header + dctxPtr->tmpInSize, srcPtr, sizeToCopy);
1401 srcPtr += sizeToCopy;
1424 if (skipSize > (size_t)(srcEnd-srcPtr)) skipSize = srcEnd-srcPtr;
1425 srcPtr += skipSize;
1471 if (srcPtr<srcEnd)
1472 dctxPtr->srcExpect = srcPtr;
1476 *srcSizePtr = (srcPtr - srcStart);