Lines Matching refs:m_len
161 unsigned int m_len;
234 unsigned int m_len;
277 static void assert_match(const struct ucl_swd * swd, unsigned int m_len,
284 assert(m_len >= 2);
287 assert(c->bp - m_off + m_len < c->ip);
288 assert(memcmp(c->bp, c->bp - m_off, m_len) == 0);
295 if (m_len > d_off)
300 assert(c->in + m_len - d_off < c->ip);
301 assert(memcmp(c->bp + d_off, c->in, m_len - d_off) ==
307 assert(memcmp(c->bp, swd->dict_end - d_off, m_len) ==
556 unsigned int m_len = s->m_len;
562 assert(s->m_len > 0);
564 scan_end1 = bp[m_len - 1];
571 assert(m_len < s->look);
574 p2[m_len - 1] == scan_end1 &&
575 p2[m_len] == p1[m_len] &&
601 if (i > m_len)
603 s->m_len = m_len = i;
605 if (m_len == s->look)
607 if (m_len >= s->nice_length)
609 if (m_len > (unsigned int) s->best3[node])
611 scan_end1 = bp[m_len - 1];
622 assert(s->m_len > 0);
638 if (s->m_len < 2)
640 s->m_len = 2;
657 assert(s->m_len > 0);
669 len = s->m_len;
670 if (s->m_len >= s->look)
682 if (s->m_len > len)
684 s->best3[s->bp] = (unsigned int)(s->m_len);
760 s->m_len = THRESHOLD;
766 c->m_len = s->m_len;
774 c->m_len = 0;
785 if (c->m_lenm_len + 1 <= c->look)
800 if (memcmp(in,ip,c->m_len+1) == 0)
801 printf("%p %p %p %5d\n",in,ip,m,c->m_len);
939 code_match(struct ucl_compress *c, unsigned int m_len, const unsigned int m_off)
942 while (m_len > c->conf.max_match)
945 m_len -= c->conf.max_match - 3;
948 c->match_bytes += m_len;
949 if (m_len > c->result[3])
950 c->result[3] = m_len;
966 m_len = m_len - 1 - (m_off > M2_MAX_OFFSET);
967 if (m_len >= 4)
971 code_prefix_ss11(c, m_len - 4);
975 bbPutBit(c, m_len > 1);
976 bbPutBit(c, (unsigned)m_len & 1);
1001 len_of_coded_match(struct ucl_compress *c, unsigned int m_len, unsigned int
1006 if (m_len < 2 || (m_len == 2 && (m_off > M2_MAX_OFFSET))
1011 m_len = m_len - 2 - (m_off > M2_MAX_OFFSET);
1027 if (m_len < 3)
1029 m_len -= 3;
1033 m_len >>= 1;
1034 } while (m_len > 0);
1046 unsigned int m_len, m_off;
1118 m_len = c->m_len;
1128 if (m_len < 2 || (m_len == 2 && (m_off > M2_MAX_OFFSET))
1140 assert_match(swd,m_len,m_off);
1144 if (SC_TRY_LAZY <= 0 || m_len >= SC_MAX_LAZY || m_off ==
1155 l1 = len_of_coded_match(c,m_len,m_off);
1158 if ((m_len - 1) < max_ahead) {
1159 max_ahead = m_len -1;
1163 while (ahead < max_ahead && c->look > m_len)
1165 if (m_len >= SC_GOOD_LENGTH)
1176 if (c->m_len < 2)
1178 l2 = len_of_coded_match(c,c->m_len,c->m_off);
1181 if (l1 + (int)(ahead + c->m_len - m_len) * 5 > l2 +
1185 assert_match(swd,c->m_len,c->m_off);
1199 code_match(c,m_len,m_off);
1201 r = find_match(c,swd,m_len,1+ahead);
1401 unsigned int m_off, m_len;
1425 m_len = GETBIT(bb, src, ilen);
1426 m_len = m_len*2 + GETBIT(bb, src, ilen);
1427 if (m_len == 0)
1429 m_len++;
1431 m_len = m_len*2 + GETBIT(bb, src, ilen);
1433 FAIL(m_len >= dst_len, "output overrun");
1435 m_len += 2;
1437 m_len += (m_off > 0xd00);
1438 FAIL(olen + m_len > dst_len, "output overrun");
1446 } while(--m_len > 0);