Lines Matching refs:dictionary
709 * else in memory, starting at ctx->dictionary with length
713 * ctx->dictionary, ctx->dictSize, and table entries
716 * ignored. Instead, ctx->dictCtx->dictionary and ctx->dictCtx
900 cctx->dictionary = NULL;
931 const BYTE* const dictionary =
932 dictDirective == usingDictCtx ? dictCtx->dictionary : cctx->dictionary;
939 const BYTE* const dictEnd = dictionary ? dictionary + dictSize : dictionary;
945 /* the dictCtx currentOffset is indexed on the start of the dictionary,
946 * while a dictionary in the current context precedes the currentOffset */
947 const BYTE* dictBase = (dictionary == NULL) ? NULL :
949 dictionary + dictSize - dictCtx->currentOffset :
950 dictionary + dictSize - startIndex;
971 /* Subsequent linked blocks can't use the dictionary. */
1034 /* there was no match, try the dictionary */
1039 lowLimit = dictionary;
1050 lowLimit = dictionary;
1114 * - lowLimit : must be == dictionary to mean "match is within extDict"; must be == source otherwise
1140 && (lowLimit==dictionary) /* match within extDict */ ) {
1226 /* there was no match, try the dictionary */
1229 lowLimit = dictionary; /* required for match length counter */
1239 lowLimit = dictionary; /* required for match length counter */
1541 int LZ4_loadDict (LZ4_stream_t* LZ4_dict, const char* dictionary, int dictSize)
1545 const BYTE* p = (const BYTE*)dictionary;
1549 DEBUGLOG(4, "LZ4_loadDict (%i bytes from %p into %p)", dictSize, dictionary, LZ4_dict);
1554 * when compressing using this dictionary */
1562 * dictionary isn't a full 64k. */
1571 dict->dictionary = p;
1594 * external dictionary context, since there is no value a table
1602 /* Don't actually attach an empty dictionary.
1618 const BYTE* dictEnd = LZ4_dict->dictionary + LZ4_dict->dictSize;
1627 LZ4_dict->dictionary = dictEnd - LZ4_dict->dictSize;
1639 const char* dictEnd = streamPtr->dictSize ? (const char*)streamPtr->dictionary + streamPtr->dictSize : NULL;
1648 if ( (streamPtr->dictSize < 4) /* tiny dictionary : not enough for a hash */
1653 DEBUGLOG(5, "LZ4_compress_fast_continue: dictSize(%u) at addr:%p is too small", streamPtr->dictSize, streamPtr->dictionary);
1654 /* remove dictionary existence from history, to employ faster prefix mode */
1656 streamPtr->dictionary = (const BYTE*)source;
1660 /* Check overlapping input/dictionary space */
1662 if ((sourceEnd > (const char*)streamPtr->dictionary) && (sourceEnd < dictEnd)) {
1666 streamPtr->dictionary = (const BYTE*)dictEnd - streamPtr->dictSize;
1670 /* prefix mode : source data follows dictionary */
1678 /* external dictionary mode */
1689 * cost to copy the dictionary's tables into the active context,
1704 streamPtr->dictionary = (const BYTE*)source;
1711 /* Hidden debug function, to force-test external dictionary mode */
1725 streamPtr->dictionary = (const BYTE*)source;
1735 * Note : no need to call LZ4_loadDict() afterwards, dictionary is immediately usable,
1737 * @return : saved dictionary size in bytes (necessarily <= dictSize), or 0 if error.
1745 if ((U32)dictSize > 64 KB) { dictSize = 64 KB; } /* useless to define a dictionary > 64 KB */
1750 const BYTE* const previousDictEnd = dict->dictionary + dict->dictSize;
1751 assert(dict->dictionary);
1755 dict->dictionary = (const BYTE*)safeBuffer;
2066 /* match starting within external dictionary */
2071 DEBUGLOG(7, "partialDecoding: dictionary match, close to dstEnd");
2078 /* match fits entirely within external dictionary : just copy */
2082 /* match stretches into both external dictionary and current block */
2251 /* match starting within external dictionary */
2260 /* match fits entirely within external dictionary : just copy */
2264 /* match stretches into both external dictionary and current block */
2446 /* The "double dictionary" mode, for use with e.g. ring buffers: the first part
2447 * of the dictionary is passed as prefix, and the second via dictStart + dictSize.
2477 * Use this function to instruct where to find the dictionary.
2479 * Loading a size of 0 is allowed (same effect as no dictionary).
2482 int LZ4_setStreamDecode (LZ4_streamDecode_t* LZ4_streamDecode, const char* dictionary, int dictSize)
2487 assert(dictionary != NULL);
2488 lz4sd->prefixEnd = (const BYTE*) dictionary + dictSize;
2490 lz4sd->prefixEnd = (const BYTE*) dictionary;
2530 /* The first call, no dictionary yet. */
2609 the dictionary must be explicitly provided within parameters
2719 return (char *)(uptrval)((LZ4_stream_t*)state)->internal_donotuse.dictionary;