rewrite diff gc, split it into small functions and scan single pass compression