Lines Matching refs:dictSize
441 U32 dictSize;
514 const BYTE* const lowRefLimit = ip - dictPtr->dictSize;
516 const BYTE* const dictEnd = dictionary + dictPtr->dictSize;
540 lowLimit = (const BYTE*)source - dictPtr->dictSize;
780 int LZ4_loadDict (LZ4_stream_t* LZ4_dict, const char* dictionary, int dictSize)
784 const BYTE* const dictEnd = p + dictSize;
789 if (dictSize < MINMATCH)
792 dict->dictSize = 0;
799 dict->dictSize = (U32)(dictEnd - p);
800 dict->currentOffset += dict->dictSize;
808 return dict->dictSize;
819 const BYTE* dictEnd = LZ4_dict->dictionary + LZ4_dict->dictSize;
827 if (LZ4_dict->dictSize > 64 KB) LZ4_dict->dictSize = 64 KB;
828 LZ4_dict->dictionary = dictEnd - LZ4_dict->dictSize;
837 const BYTE* const dictEnd = streamPtr->dictionary + streamPtr->dictSize;
841 if ((streamPtr->dictSize>0) && (smallest>dictEnd)) smallest = dictEnd;
849 streamPtr->dictSize = (U32)(dictEnd - sourceEnd);
850 if (streamPtr->dictSize > 64 KB) streamPtr->dictSize = 64 KB;
851 if (streamPtr->dictSize < 4) streamPtr->dictSize = 0;
852 streamPtr->dictionary = dictEnd - streamPtr->dictSize;
860 if ((streamPtr->dictSize < 64 KB) && (streamPtr->dictSize < streamPtr->currentOffset))
864 streamPtr->dictSize += (U32)inputSize;
872 if ((streamPtr->dictSize < 64 KB) && (streamPtr->dictSize < streamPtr->currentOffset))
877 streamPtr->dictSize = (U32)inputSize;
899 const BYTE* const dictEnd = streamPtr->dictionary + streamPtr->dictSize;
908 streamPtr->dictSize = (U32)inputSize;
915 int LZ4_saveDict (LZ4_stream_t* LZ4_dict, char* safeBuffer, int dictSize)
918 const BYTE* previousDictEnd = dict->dictionary + dict->dictSize;
920 if ((U32)dictSize > 64 KB) dictSize = 64 KB; /* useless to define a dictionary > 64 KB */
921 if ((U32)dictSize > dict->dictSize) dictSize = dict->dictSize;
923 memmove(safeBuffer, previousDictEnd - dictSize, dictSize);
926 dict->dictSize = (U32)dictSize;
928 return dictSize;
954 const size_t dictSize /* note : = 0 if noDict */
965 const BYTE* const lowLimit = lowPrefix - dictSize;
967 const BYTE* const dictEnd = (const BYTE*)dictStart + dictSize;
972 const int checkOffset = ((safeDecode) && (dictSize < (int)(64 KB)));
1171 int LZ4_setStreamDecode (LZ4_streamDecode_t* LZ4_streamDecode, const char* dictionary, int dictSize)
1174 lz4sd->prefixSize = (size_t) dictSize;
1175 lz4sd->prefixEnd = (BYTE*) dictionary + dictSize;
1254 FORCE_INLINE int LZ4_decompress_usingDict_generic(const char* source, char* dest, int compressedSize, int maxOutputSize, int safe, const char* dictStart, int dictSize)
1256 if (dictSize==0)
1258 if (dictStart+dictSize == dest)
1260 if (dictSize >= (int)(64 KB - 1))
1262 return LZ4_decompress_generic(source, dest, compressedSize, maxOutputSize, safe, full, 0, noDict, (BYTE*)dest-dictSize, NULL, 0);
1264 return LZ4_decompress_generic(source, dest, compressedSize, maxOutputSize, safe, full, 0, usingExtDict, (BYTE*)dest, (BYTE*)dictStart, dictSize);
1267 int LZ4_decompress_safe_usingDict(const char* source, char* dest, int compressedSize, int maxOutputSize, const char* dictStart, int dictSize)
1269 return LZ4_decompress_usingDict_generic(source, dest, compressedSize, maxOutputSize, 1, dictStart, dictSize);
1272 int LZ4_decompress_fast_usingDict(const char* source, char* dest, int originalSize, const char* dictStart, int dictSize)
1274 return LZ4_decompress_usingDict_generic(source, dest, 0, originalSize, 0, dictStart, dictSize);
1278 int LZ4_decompress_safe_forceExtDict(const char* source, char* dest, int compressedSize, int maxOutputSize, const char* dictStart, int dictSize)
1280 return LZ4_decompress_generic(source, dest, compressedSize, maxOutputSize, endOnInputSize, full, 0, usingExtDict, (BYTE*)dest, (BYTE*)dictStart, dictSize);
1324 int dictSize = LZ4_saveDict((LZ4_stream_t*)ctx, (char*)ctx->bufferStart, 64 KB);
1325 return (char*)(ctx->bufferStart + dictSize);