Lines Matching refs:BYTE

149   typedef  uint8_t BYTE;
156 typedef unsigned char BYTE;
175 const union { U32 u; BYTE c[4]; } one = { 1 }; /* don't use static : performance detrimental */
238 const BYTE* p = (const BYTE*)memPtr;
248 BYTE* p = (BYTE*)memPtr;
249 p[0] = (BYTE) value;
250 p[1] = (BYTE)(value>>8);
262 BYTE* d = (BYTE*)dstPtr;
263 const BYTE* s = (const BYTE*)srcPtr;
264 BYTE* const e = (BYTE*)dstEnd;
361 static unsigned LZ4_count(const BYTE* pIn, const BYTE* pMatch, const BYTE* pInLimit)
363 const BYTE* const pStart = pIn;
437 static void LZ4_putPositionOnHash(const BYTE* p, U32 h, void* tableBase, tableType_t const tableType, const BYTE* srcBase)
441 case byPtr: { const BYTE** hashTable = (const BYTE**)tableBase; hashTable[h] = p; return; }
447 FORCE_INLINE void LZ4_putPosition(const BYTE* p, void* tableBase, tableType_t tableType, const BYTE* srcBase)
453 static const BYTE* LZ4_getPositionOnHash(U32 h, void* tableBase, tableType_t tableType, const BYTE* srcBase)
455 if (tableType == byPtr) { const BYTE** hashTable = (const BYTE**) tableBase; return hashTable[h]; }
460 FORCE_INLINE const BYTE* LZ4_getPosition(const BYTE* p, void* tableBase, tableType_t tableType, const BYTE* srcBase)
481 const BYTE* ip = (const BYTE*) source;
482 const BYTE* base;
483 const BYTE* lowLimit;
484 const BYTE* const lowRefLimit = ip - cctx->dictSize;
485 const BYTE* const dictionary = cctx->dictionary;
486 const BYTE* const dictEnd = dictionary + cctx->dictSize;
487 const ptrdiff_t dictDelta = dictEnd - (const BYTE*)source;
488 const BYTE* anchor = (const BYTE*) source;
489 const BYTE* const iend = ip + inputSize;
490 const BYTE* const mflimit = iend - MFLIMIT;
491 const BYTE* const matchlimit = iend - LASTLITERALS;
493 BYTE* op = (BYTE*) dest;
494 BYTE* const olimit = op + maxOutputSize;
504 base = (const BYTE*)source;
505 lowLimit = (const BYTE*)source;
508 base = (const BYTE*)source - cctx->currentOffset;
509 lowLimit = (const BYTE*)source - cctx->dictSize;
512 base = (const BYTE*)source - cctx->currentOffset;
513 lowLimit = (const BYTE*)source;
526 const BYTE* match;
527 BYTE* token;
530 { const BYTE* forwardIp = ip;
543 if (match < (const BYTE*)source) {
548 lowLimit = (const BYTE*)source;
571 *op++ = (BYTE)len;
573 else *token = (BYTE)(litLength<<ML_BITS);
588 const BYTE* limit;
595 unsigned const more = LZ4_count(ip, (const BYTE*)source, matchlimit);
613 *op++ = (BYTE)(matchCode % 255);
615 *token += (BYTE)(matchCode);
629 if (match < (const BYTE*)source) {
634 lowLimit = (const BYTE*)source;
650 ((op - (BYTE*)dest) + lastRun + 1 + ((lastRun+255-RUN_MASK)/255) > (U32)maxOutputSize) )
656 *op++ = (BYTE) accumulator;
658 *op++ = (BYTE)(lastRun<<ML_BITS);
739 const BYTE* ip = (const BYTE*) src;
740 const BYTE* base = (const BYTE*) src;
741 const BYTE* lowLimit = (const BYTE*) src;
742 const BYTE* anchor = ip;
743 const BYTE* const iend = ip + *srcSizePtr;
744 const BYTE* const mflimit = iend - MFLIMIT;
745 const BYTE* const matchlimit = iend - LASTLITERALS;
747 BYTE* op = (BYTE*) dst;
748 BYTE* const oend = op + targetDstSize;
749 BYTE* const oMaxLit = op + targetDstSize - 2 /* offset */ - 8 /* because 8+MINMATCH==MFLIMIT */ - 1 /* token */;
750 BYTE* const oMaxMatch = op + targetDstSize - (LASTLITERALS + 1 /* token */);
751 BYTE* const oMaxSeq = oMaxLit - 1 /* token */;
769 const BYTE* match;
770 BYTE* token;
773 { const BYTE* forwardIp = ip;
808 *op++ = (BYTE)len;
810 else *token = (BYTE)(litLength<<ML_BITS);
834 *op++ = (BYTE)matchLength;
836 else *token += (BYTE)(matchLength);
873 *op++ = (BYTE) accumulator;
875 *op++ = (BYTE)(lastRunSize<<ML_BITS);
949 const BYTE* p = (const BYTE*)dictionary;
950 const BYTE* const dictEnd = p + dictSize;
951 const BYTE* base;
978 static void LZ4_renormDictT(LZ4_stream_t_internal* LZ4_dict, const BYTE* src)
984 const BYTE* dictEnd = LZ4_dict->dictionary + LZ4_dict->dictSize;
1000 const BYTE* const dictEnd = streamPtr->dictionary + streamPtr->dictSize;
1002 const BYTE* smallest = (const BYTE*) source;
1009 { const BYTE* sourceEnd = (const BYTE*) source + inputSize;
1019 if (dictEnd == (const BYTE*)source) {
1036 streamPtr->dictionary = (const BYTE*)source;
1049 const BYTE* const dictEnd = streamPtr->dictionary + streamPtr->dictSize;
1051 const BYTE* smallest = dictEnd;
1052 if (smallest > (const BYTE*) source) smallest = (const BYTE*) source;
1057 streamPtr->dictionary = (const BYTE*)source;
1075 const BYTE* const previousDictEnd = dict->dictionary + dict->dictSize;
1082 dict->dictionary = (const BYTE*)safeBuffer;
1109 const BYTE* const lowPrefix, /* == dest when no prefix */
1110 const BYTE* const dictStart, /* only if dict==usingExtDict */
1115 const BYTE* ip = (const BYTE*) source;
1116 const BYTE* const iend = ip + inputSize;
1118 BYTE* op = (BYTE*) dest;
1119 BYTE* const oend = op + outputSize;
1120 BYTE* cpy;
1121 BYTE* oexit = op + targetOutputSize;
1122 const BYTE* const lowLimit = lowPrefix - dictSize;
1124 const BYTE* const dictEnd = (const BYTE*)dictStart + dictSize;
1140 const BYTE* match;
1209 BYTE* const endOfMatch = op + restSize;
1210 const BYTE* copyFrom = lowPrefix;
1234 BYTE* const oCopyLimit = oend-(WILDCOPYLENGTH-1);
1263 return LZ4_decompress_generic(source, dest, compressedSize, maxDecompressedSize, endOnInputSize, full, 0, noDict, (BYTE*)dest, NULL, 0);
1268 return LZ4_decompress_generic(source, dest, compressedSize, maxDecompressedSize, endOnInputSize, partial, targetOutputSize, noDict, (BYTE*)dest, NULL, 0);
1273 return LZ4_decompress_generic(source, dest, 0, originalSize, endOnOutputSize, full, 0, withPrefix64k, (BYTE*)(dest - 64 KB), NULL, 64 KB);
1307 lz4sd->prefixEnd = (const BYTE*) dictionary + dictSize;
1325 if (lz4sd->prefixEnd == (BYTE*)dest) {
1337 usingExtDict, (BYTE*)dest, lz4sd->externalDict, lz4sd->extDictSize);
1340 lz4sd->prefixEnd = (BYTE*)dest + result;
1351 if (lz4sd->prefixEnd == (BYTE*)dest) {
1363 usingExtDict, (BYTE*)dest, lz4sd->externalDict, lz4sd->extDictSize);
1366 lz4sd->prefixEnd = (BYTE*)dest + originalSize;
1383 return LZ4_decompress_generic(source, dest, compressedSize, maxOutputSize, safe, full, 0, noDict, (BYTE*)dest, NULL, 0);
1386 return LZ4_decompress_generic(source, dest, compressedSize, maxOutputSize, safe, full, 0, withPrefix64k, (BYTE*)dest-64 KB, NULL, 0);
1387 return LZ4_decompress_generic(source, dest, compressedSize, maxOutputSize, safe, full, 0, noDict, (BYTE*)dest-dictSize, NULL, 0);
1389 return LZ4_decompress_generic(source, dest, compressedSize, maxOutputSize, safe, full, 0, usingExtDict, (BYTE*)dest, (const BYTE*)dictStart, dictSize);
1405 return LZ4_decompress_generic(source, dest, compressedSize, maxOutputSize, endOnInputSize, full, 0, usingExtDict, (BYTE*)dest, (const BYTE*)dictStart, dictSize);
1434 static void LZ4_init(LZ4_stream_t* lz4ds, BYTE* base)
1443 LZ4_init((LZ4_stream_t*)state, (BYTE*)inputBuffer);
1450 LZ4_init (lz4ds, (BYTE*)inputBuffer);
1465 return LZ4_decompress_generic(source, dest, compressedSize, maxOutputSize, endOnInputSize, full, 0, withPrefix64k, (BYTE*)dest - 64 KB, NULL, 64 KB);
1470 return LZ4_decompress_generic(source, dest, 0, originalSize, endOnOutputSize, full, 0, withPrefix64k, (BYTE*)dest - 64 KB, NULL, 64 KB);