Lines Matching defs:BYTE

119   typedef  uint8_t BYTE;
125 typedef unsigned char BYTE;
142 const union { U32 i; BYTE c[4]; } one = { 1 }; /* don't use static : performance detrimental */
162 const BYTE* p = (const BYTE*)memPtr;
175 BYTE* p = (BYTE*)memPtr;
176 p[0] = (BYTE) value;
177 p[1] = (BYTE)(value>>8);
211 BYTE* d = (BYTE*)dstPtr;
212 const BYTE* s = (const BYTE*)srcPtr;
213 BYTE* e = (BYTE*)dstEnd;
317 static unsigned LZ4_count(const BYTE* pIn, const BYTE* pMatch, const BYTE* pInLimit)
319 const BYTE* const pStart = pIn;
355 const BYTE* dictionary;
356 BYTE* bufferStart; /* obsolete, used for slideInputBuffer */
408 static void LZ4_putPositionOnHash(const BYTE* p, U32 h, void* tableBase, tableType_t const tableType, const BYTE* srcBase)
412 case byPtr: { const BYTE** hashTable = (const BYTE**)tableBase; hashTable[h] = p; return; }
418 static void LZ4_putPosition(const BYTE* p, void* tableBase, tableType_t tableType, const BYTE* srcBase)
424 static const BYTE* LZ4_getPositionOnHash(U32 h, void* tableBase, tableType_t tableType, const BYTE* srcBase)
426 if (tableType == byPtr) { const BYTE** hashTable = (const BYTE**) tableBase; return hashTable[h]; }
431 static const BYTE* LZ4_getPosition(const BYTE* p, void* tableBase, tableType_t tableType, const BYTE* srcBase)
451 const BYTE* ip = (const BYTE*) source;
452 const BYTE* base;
453 const BYTE* lowLimit;
454 const BYTE* const lowRefLimit = ip - dictPtr->dictSize;
455 const BYTE* const dictionary = dictPtr->dictionary;
456 const BYTE* const dictEnd = dictionary + dictPtr->dictSize;
457 const size_t dictDelta = dictEnd - (const BYTE*)source;
458 const BYTE* anchor = (const BYTE*) source;
459 const BYTE* const iend = ip + inputSize;
460 const BYTE* const mflimit = iend - MFLIMIT;
461 const BYTE* const matchlimit = iend - LASTLITERALS;
463 BYTE* op = (BYTE*) dest;
464 BYTE* const olimit = op + maxOutputSize;
475 base = (const BYTE*)source;
476 lowLimit = (const BYTE*)source;
479 base = (const BYTE*)source - dictPtr->currentOffset;
480 lowLimit = (const BYTE*)source - dictPtr->dictSize;
483 base = (const BYTE*)source - dictPtr->currentOffset;
484 lowLimit = (const BYTE*)source;
497 const BYTE* match;
498 BYTE* token;
500 const BYTE* forwardIp = ip;
516 if (match<(const BYTE*)source)
524 lowLimit = (const BYTE*)source;
549 *op++ = (BYTE)len;
551 else *token = (BYTE)(litLength<<ML_BITS);
568 const BYTE* limit;
576 unsigned more = LZ4_count(ip, (const BYTE*)source, matchlimit);
595 *op++ = (BYTE)matchLength;
597 else *token += (BYTE)(matchLength);
612 if (match<(const BYTE*)source)
620 lowLimit = (const BYTE*)source;
637 if ((outputLimited) && ((op - (BYTE*)dest) + lastRun + 1 + ((lastRun+255-RUN_MASK)/255) > (U32)maxOutputSize))
644 *op++ = (BYTE) accumulator;
648 *op++ = (BYTE)(lastRun<<ML_BITS);
734 const BYTE* ip = (const BYTE*) src;
735 const BYTE* base = (const BYTE*) src;
736 const BYTE* lowLimit = (const BYTE*) src;
737 const BYTE* anchor = ip;
738 const BYTE* const iend = ip + *srcSizePtr;
739 const BYTE* const mflimit = iend - MFLIMIT;
740 const BYTE* const matchlimit = iend - LASTLITERALS;
742 BYTE* op = (BYTE*) dst;
743 BYTE* const oend = op + targetDstSize;
744 BYTE* const oMaxLit = op + targetDstSize - 2 /* offset */ - 8 /* because 8+MINMATCH==MFLIMIT */ - 1 /* token */;
745 BYTE* const oMaxMatch = op + targetDstSize - (LASTLITERALS + 1 /* token */);
746 BYTE* const oMaxSeq = oMaxLit - 1 /* token */;
765 const BYTE* match;
766 BYTE* token;
768 const BYTE* forwardIp = ip;
808 *op++ = (BYTE)len;
810 else *token = (BYTE)(litLength<<ML_BITS);
840 *op++ = (BYTE)matchLength;
842 else *token += (BYTE)(matchLength);
882 *op++ = (BYTE) accumulator;
886 *op++ = (BYTE)(lastRunSize<<ML_BITS);
967 const BYTE* p = (const BYTE*)dictionary;
968 const BYTE* const dictEnd = p + dictSize;
969 const BYTE* base;
998 static void LZ4_renormDictT(LZ4_stream_t_internal* LZ4_dict, const BYTE* src)
1005 const BYTE* dictEnd = LZ4_dict->dictionary + LZ4_dict->dictSize;
1022 const BYTE* const dictEnd = streamPtr->dictionary + streamPtr->dictSize;
1024 const BYTE* smallest = (const BYTE*) source;
1032 const BYTE* sourceEnd = (const BYTE*) source + inputSize;
1043 if (dictEnd == (const BYTE*)source)
1062 streamPtr->dictionary = (const BYTE*)source;
1076 const BYTE* const dictEnd = streamPtr->dictionary + streamPtr->dictSize;
1078 const BYTE* smallest = dictEnd;
1079 if (smallest > (const BYTE*) source) smallest = (const BYTE*) source;
1084 streamPtr->dictionary = (const BYTE*)source;
1096 const BYTE* previousDictEnd = dict->dictionary + dict->dictSize;
1103 dict->dictionary = (const BYTE*)safeBuffer;
1129 const BYTE* const lowPrefix, /* == dest if dict == noDict */
1130 const BYTE* const dictStart, /* only if dict==usingExtDict */
1135 const BYTE* ip = (const BYTE*) source;
1136 const BYTE* const iend = ip + inputSize;
1138 BYTE* op = (BYTE*) dest;
1139 BYTE* const oend = op + outputSize;
1140 BYTE* cpy;
1141 BYTE* oexit = op + targetOutputSize;
1142 const BYTE* const lowLimit = lowPrefix - dictSize;
1144 const BYTE* const dictEnd = (const BYTE*)dictStart + dictSize;
1163 const BYTE* match;
1242 BYTE* const endOfMatch = op + copySize;
1243 const BYTE* copyFrom = lowPrefix;
1299 return LZ4_decompress_generic(source, dest, compressedSize, maxDecompressedSize, endOnInputSize, full, 0, noDict, (BYTE*)dest, NULL, 0);
1304 return LZ4_decompress_generic(source, dest, compressedSize, maxDecompressedSize, endOnInputSize, partial, targetOutputSize, noDict, (BYTE*)dest, NULL, 0);
1309 return LZ4_decompress_generic(source, dest, 0, originalSize, endOnOutputSize, full, 0, withPrefix64k, (BYTE*)(dest - 64 KB), NULL, 64 KB);
1318 const BYTE* externalDict;
1320 const BYTE* prefixEnd;
1352 lz4sd->prefixEnd = (const BYTE*) dictionary + dictSize;
1370 if (lz4sd->prefixEnd == (BYTE*)dest)
1385 usingExtDict, (BYTE*)dest, lz4sd->externalDict, lz4sd->extDictSize);
1388 lz4sd->prefixEnd = (BYTE*)dest + result;
1399 if (lz4sd->prefixEnd == (BYTE*)dest)
1411 lz4sd->externalDict = (BYTE*)dest - lz4sd->extDictSize;
1414 usingExtDict, (BYTE*)dest, lz4sd->externalDict, lz4sd->extDictSize);
1417 lz4sd->prefixEnd = (BYTE*)dest + originalSize;
1435 return LZ4_decompress_generic(source, dest, compressedSize, maxOutputSize, safe, full, 0, noDict, (BYTE*)dest, NULL, 0);
1439 return LZ4_decompress_generic(source, dest, compressedSize, maxOutputSize, safe, full, 0, withPrefix64k, (BYTE*)dest-64 KB, NULL, 0);
1440 return LZ4_decompress_generic(source, dest, compressedSize, maxOutputSize, safe, full, 0, noDict, (BYTE*)dest-dictSize, NULL, 0);
1442 return LZ4_decompress_generic(source, dest, compressedSize, maxOutputSize, safe, full, 0, usingExtDict, (BYTE*)dest, (const BYTE*)dictStart, dictSize);
1459 return LZ4_decompress_generic(source, dest, compressedSize, maxOutputSize, endOnInputSize, full, 0, usingExtDict, (BYTE*)dest, (const BYTE*)dictStart, dictSize);
1491 static void LZ4_init(LZ4_stream_t_internal* lz4ds, BYTE* base)
1500 LZ4_init((LZ4_stream_t_internal*)state, (BYTE*)inputBuffer);
1508 LZ4_init ((LZ4_stream_t_internal*)lz4ds, (BYTE*)inputBuffer);
1524 return LZ4_decompress_generic(source, dest, compressedSize, maxOutputSize, endOnInputSize, full, 0, withPrefix64k, (BYTE*)dest - 64 KB, NULL, 64 KB);
1529 return LZ4_decompress_generic(source, dest, 0, originalSize, endOnOutputSize, full, 0, withPrefix64k, (BYTE*)dest - 64 KB, NULL, 64 KB);