Implement EXTRA_PATCH_TREE. (idea from the PR)
this is obviously part of a bigger change, so I can't comment on that part but the part about the EXTRA_PATCH_TREE looks like it should work.
I don't see why one would have a compressed patch file but handling it shouldn't hurt. (except by hiding bugs through added complexity.)