Lines Matching refs:swd
277 static void assert_match(const struct ucl_swd * swd, unsigned int m_len, in assert_match() argument
281 const struct ucl_compress *c = swd->c; in assert_match()
292 assert(swd->dict != NULL); in assert_match()
294 assert(d_off <= swd->dict_len); in assert_match()
297 assert(memcmp(c->bp, swd->dict_end - d_off, d_off) == in assert_match()
307 assert(memcmp(c->bp, swd->dict_end - d_off, m_len) == in assert_match()
1049 struct ucl_swd *swd; in ucl_nrv2b_99_compress() local
1082 swd = (struct ucl_swd *) malloc(sizeof(*swd)); in ucl_nrv2b_99_compress()
1083 if (!swd) in ucl_nrv2b_99_compress()
1086 swd->f = F; in ucl_nrv2b_99_compress()
1087 swd->n = N; in ucl_nrv2b_99_compress()
1088 if (in_len >= 256 && in_len < swd->n) in ucl_nrv2b_99_compress()
1089 swd->n = in_len; in ucl_nrv2b_99_compress()
1090 if (swd->f < 8 || swd->n < 256) in ucl_nrv2b_99_compress()
1093 r = init_match(c,swd,NULL,0, SC_FLAGS); in ucl_nrv2b_99_compress()
1096 free(swd); in ucl_nrv2b_99_compress()
1100 swd->max_chain = SC_MAX_CHAIN; in ucl_nrv2b_99_compress()
1102 swd->nice_length = SC_NICE_LENGTH; in ucl_nrv2b_99_compress()
1103 if (c->conf.max_match < swd->nice_length) in ucl_nrv2b_99_compress()
1104 swd->nice_length = c->conf.max_match; in ucl_nrv2b_99_compress()
1107 r = find_match(c,swd,0,0); in ucl_nrv2b_99_compress()
1126 assert(swd->b_char == *(c->bp)); in ucl_nrv2b_99_compress()
1133 swd->max_chain = SC_MAX_CHAIN; in ucl_nrv2b_99_compress()
1134 r = find_match(c,swd,1,0); in ucl_nrv2b_99_compress()
1140 assert_match(swd,m_len,m_off); in ucl_nrv2b_99_compress()
1166 swd->max_chain = SC_MAX_CHAIN >> 2; in ucl_nrv2b_99_compress()
1168 swd->max_chain = SC_MAX_CHAIN; in ucl_nrv2b_99_compress()
1169 r = find_match(c,swd,1,0); in ucl_nrv2b_99_compress()
1185 assert_match(swd,c->m_len,c->m_off); in ucl_nrv2b_99_compress()
1200 swd->max_chain = SC_MAX_CHAIN; in ucl_nrv2b_99_compress()
1201 r = find_match(c,swd,m_len,1+ahead); in ucl_nrv2b_99_compress()
1229 swd_exit(swd); in ucl_nrv2b_99_compress()
1230 free(swd); in ucl_nrv2b_99_compress()