使用 262144 的块大小时,我从 zlib deflate 收到以下错误。
访问冲突写入位置 0x005AF000。
错误发生在 _tr_tally_dist
dist 的值为 26885,last_lit = 35312。
有任何想法吗?
void _tr_tally_dist (s, distance, length, flush)
deflate_state *s;
unsigned int distance;
unsigned int length;
int flush;
{
unsigned char len = length;
unsigned short dist = distance;
flush = (s->last_lit >= s->lit_bufsize - 1);
**s->d_buf[s->last_lit] = dist;**
s->l_buf[s->last_lit++] = len;
dist--;
s->dyn_ltree[_length_code[len] + LITERALS + 1].Freq++;
s->dyn_dtree[d_code (dist)].Freq++;
}