> We need to be careful here, because finding the actual best compression for an arbitrary format can be equivalent to solving the halting problem.
I don't see why that would be relevant here. The goal is to find the best compression of a given source among all possible DEFLATE streams, not to find the best compression of a given source among all possible ways to compress data. There are only so many DEFLATE streams shorter than the original source, you "simply" try them all, and then you've halted. That said:
> Now, Zopfli is the software that performs an exhaustive search across all possible syntactically valid streams
Maybe I don't understand LZ77 as well as I thought, but surely the search space is way too big to exhaust?