The current code is still far from happy. I've deduplicated and simplified it a bit but it's still a pile of hacks with other hacks on top to fix more of the corner cases. FWICS there are two more parts crying for rewrite:
[x] mark compress/no-compress per file rather than per-dir+file,
[x] fix broken symlinks all over the place, not only in compressed dirs.
The current code is still far from happy. I've deduplicated and simplified it a bit but it's still a pile of hacks with other hacks on top to fix more of the corner cases. FWICS there are two more parts crying for rewrite: