Lines Matching refs:lmc
151 /* The LMC cache starts at the beginning of the block rather than the
157 unsigned char cache_available = s->lmc && (s->lmc->length[lmcpos] == 0 ||
158 s->lmc->dist[lmcpos] != 0);
160 (*limit == ZOPFLI_MAX_MATCH || s->lmc->length[lmcpos] <= *limit ||
161 (sublen && ZopfliMaxCachedSublen(s->lmc,
162 lmcpos, s->lmc->length[lmcpos]) >= *limit));
164 if (s->lmc && limit_ok_for_cache && cache_available) {
165 if (!sublen || s->lmc->length[lmcpos]
166 <= ZopfliMaxCachedSublen(s->lmc, lmcpos, s->lmc->length[lmcpos])) {
167 *length = s->lmc->length[lmcpos];
170 ZopfliCacheToSublen(s->lmc, lmcpos, *length, sublen);
173 assert(sublen[*length] == s->lmc->dist[lmcpos]);
176 *distance = s->lmc->dist[lmcpos];
182 *limit = s->lmc->length[lmcpos];
196 /* The LMC cache starts at the beginning of the block rather than the
202 unsigned char cache_available = s->lmc && (s->lmc->length[lmcpos] == 0 ||
203 s->lmc->dist[lmcpos] != 0);
205 if (s->lmc && limit == ZOPFLI_MAX_MATCH && sublen && !cache_available) {
206 assert(s->lmc->length[lmcpos] == 1 && s->lmc->dist[lmcpos] == 0);
207 s->lmc->dist[lmcpos] = length < ZOPFLI_MIN_MATCH ? 0 : distance;
208 s->lmc->length[lmcpos] = length < ZOPFLI_MIN_MATCH ? 0 : length;
209 assert(!(s->lmc->length[lmcpos] == 1 && s->lmc->dist[lmcpos] == 0));
210 ZopfliSublenToCache(sublen, lmcpos, length, s->lmc);