<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>It was not really complicated, basically the distances tree is simply added behind the literals/eob/lengths tree.</div><div><br></div><div><div> while (n <= dmax_code) {</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>ltree[++lmax_code].Len = dtree[n++].Len;</div><div> }</div></div><div><br></div><div>Attached my version of trees.c with mersca_trees replacing scan_tree, it also holds my previous patch (november 2011), and two samples v3.gz v3p.gz (v3.gz file produced by minigzip, v3p file produced by minigzip compiled with the modified version of trees.c).</div><div><br></div><div></div></body></html>